You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Nik Conwell <ni...@bu.edu> on 2000/02/24 16:10:27 UTC

Enhanced mod_perl for Arguments to the Perl interpreter

Hi.  I had the need to specify arguments to the mod_perl Perl interpreter
(-I in my case) so I enhanced mod_perl to add a new configuration
directive, PerlArguments and to pass those to perl when it's started.  
The code change was made to mod_perl 1.21.

Interested in including it?  Where should I send the diffs?

Thanks.
-nik

Nik Conwell         Information Technology       nik@bu.edu


Re: Enhanced mod_perl for Arguments to the Perl interpreter

Posted by Nik Conwell <ni...@bu.edu>.
On Tue, 29 Feb 2000, Doug MacEachern wrote:

> On Thu, 24 Feb 2000, Nik Conwell wrote:
> 
> > 
> > Hi.  I had the need to specify arguments to the mod_perl Perl interpreter
> > (-I in my case) so I enhanced mod_perl to add a new configuration
> > directive, PerlArguments and to pass those to perl when it's started.  
> > The code change was made to mod_perl 1.21.
> 
> thanks for offering the patch, but there's no need for -I to be passed to 
> perl_parse, you can modify @INC at startup time, e.g.
> 
> #httpd.conf
> <Perl>
> use lib qw(/foo/bar)
> </Perl>

I think this is probably too late for my needs.  I wanted to override the
Apache.pm that mod_perl pulls in before the various mod_perl startup
facilities get run.

> you can also use the PERL5OPT environment variable to pass nearly all
> other commandline arguments to Perl (see perldoc perlrun)

That should do the trick.  Thanks for the info; it doesn't seem to be in
Camel2.
-nik


Re: Enhanced mod_perl for Arguments to the Perl interpreter

Posted by Doug MacEachern <do...@pobox.com>.
On Thu, 24 Feb 2000, Nik Conwell wrote:

> 
> Hi.  I had the need to specify arguments to the mod_perl Perl interpreter
> (-I in my case) so I enhanced mod_perl to add a new configuration
> directive, PerlArguments and to pass those to perl when it's started.  
> The code change was made to mod_perl 1.21.

thanks for offering the patch, but there's no need for -I to be passed to 
perl_parse, you can modify @INC at startup time, e.g.

#httpd.conf
<Perl>
use lib qw(/foo/bar)
</Perl>

you can also use the PERL5OPT environment variable to pass nearly all
other commandline arguments to Perl (see perldoc perlrun)