[CMI.PM] cgi-lib.pl "not found in @INC"???
Mitch Kutzko
mitch at ncsa.uiuc.edu
Thu Apr 21 16:53:56 PDT 2005
At 06:37 PM 4/21/2005 -0500, Daniel S. Lewart wrote:
> Mitch, et al,
>
> > Hi -- It's feast or famine, Perlmongers!
>
> Mmmmm ... Perl feast!
*heh*
> > 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/;
I want to use the cgi-bin.pl routines to validate and interpret the
arguments passed in via the URL. Removing the 'require' and replacing it with
use CGI qw/:standard/;
does get rid of offending reference, of course, but at the expense of not
being able to use any of the cgi-lib.pl code.
Can you explain what I need to do here with something more useful than
"Gack!"?
> > 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
I'm trying to work with a single file reference here -- I'm not *trying* to
include a module, Dan.
Any ideas?
Mitch
--
Mitch Kutzko | mitch at dast.nlanr.net | mitch at ncsa.uiuc.edu | 217-333-1199
http://hobbes.ncsa.uiuc.edu/
More information about the Champaign-Urbana
mailing list