Purcell, Scott <[EMAIL PROTECTED]> said something to this effect on 06/27/2001:
> Mod_perl version: 1.25_01-dev
> Perl version:         5.6.1
> Apache Version:  1.3.20
> OS:                    NT
> 
> I am in the apache book and I am doing some hacking. In my startup.pl file,
> I put 'use CG qw(:standard); along with some other modules.
> Anyway, then I typed that little dittie below, and commented out the $use
> CGI (since I thought it would be loaded in the startup.pl file).
> 
> It does not work. Are the items in the startup.pl file only used with
> handlers?

You still need to tell Perl that the script in question (e.g.,
the one you attached) needs to use the functions from CGI.
Without that line, "param" and friends are not defined.

Putting CGI in your startup.pl means that it will be required and
compiled only once; all the scripts/modules that need to make use
of the pre-compiled module still need to 'use' it. In these cases,
only the importing of subroutine names and stuff like that
happens.

As an aside, you could (possibly) get away with invoking the
param function as CGI::param; you didn't specify what kind of
"didn't work" you got in the error log.

(darren)

-- 
Every program has at least one bug, and at least one line of code
that can be removed.  Therefore, by induction, every program can
be reduced to one line of code that doesn't work.

Reply via email to