[CMI.PM] cgi-lib.pl "not found in @INC"???
Daniel S. Lewart
lewart at uiuc.edu
Thu Apr 21 16:37:51 PDT 2005
Mitch, et al,
> Hi -- It's feast or famine, Perlmongers!
Mmmmm ... Perl feast!
> Having some "require" trouble that seems to think I want a module, not just
> one file.
> This code:
> #!/usr/bin/perl -w
> use strict;
> use HTML::Calendar::Simple;
> use HTML::CalendarMonthSimple;
> my $usingcgi = ($ENV{"HTTP_USER_AGENT"} ne "");
> if ($usingcgi) {
> require "cgi-bin.pl";
> }
Gack! Catch up with the rest of the world and replace these with:
use CGI qw/:standard/;
> if ($usingcgi) {
> # &ReadParse;
> }
> Produces this error in /var/log/httpd/error_log:
> [Thu Apr 21 18:21:00 2005] [error] [client 69.212.106.31] Can't locate
> cgi-bin.pl in @INC (@INC contains:
> ...
> Why does it think I want to use a module here, instead of just using the
> local cgi-bin.pl file?
Two reasons:
1) The current directory (".") is not part of @INC.
2) Modules do not belong in a cgi-bin directory
Cheers,
Dan
http://cmi.pm.org/
More information about the Champaign-Urbana
mailing list