Jump to content

[Solved] Perl modules


jacobb20

Recommended Posts

Okay, I've installed the requested modules.

 

Still getting an error indicating that File::Fetch is not installed?

 

Can't locate File/Fetch.pm in @INC (@INC contains: lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at lib/twstats.pm line 9.

 

Link to comment
Share on other sites

cpan definitely thinks that it's installed, and a simple "perl -MFile::Fetch -e 1" doesn't error out, even when run from a user account.

 

See http://civwar.heliohost.org/test.cgi

 

here is test.cgi

 

#!/usr/bin/perl

#===== Add perl lib library =======================================
use strict;
use CGI::Carp qw(warningsToBrowser fatalsToBrowser); 
BEGIN {
    my $base_module_dir = (-d '/home1/jacobb20/perl' ? '/home1/jacobb20/perl' : ( getpwuid($>) )[7] . '/perl/');
    unshift @INC, map { $base_module_dir . $_ } @INC;
}

#===== Perl Libraries =============================================
use CGI;
use HTML::Template;
use DBI;
use File::Fetch;
#use File::ReadBackwards;
#use Date::Manip;

print "Content-type:text/html\n\n";
print "Hello!<br>";

 

thanks for your help with this.

Link to comment
Share on other sites

Hmm... so it looks like cpan installs to a totally different set of directories than CGI Perl's @INC. Actually, command-line and CGI Perl have totally different @INC paths. Weird...

 

Anyways, I've copied over the package to CGI Perl's @INC. Your script seems to be working now.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...