On Mon, 17 Mar 2003, Perrin Harkins wrote:
Goehring, Chuck Mr., RCI - San Diego wrote:
Where do you put your .pm files for application-specific code?
Under mod_perl 1, I just put them in <SERVER_ROOT>/lib/perl, which is automatically added to @INC by mod_perl. Can someone confirm if this still works for mp2?
I do not believe so.
Though it is easy to add. See the patch below.
The question is, do we want to have this feature in mp2? Does it really save someone a trouble of creating a startup file? Also, In 2.0 you don't have to create a startup file for that, you can simply say:
PerlSwitches -I/home/httpd -I/home/httpd/lib/perl
Admittedly you will have to hardcode the document root in this case, but you do that anyways in httpd.conf when you specify it.
Index: src/modules/perl/mod_perl.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.157 diff -u -r1.157 mod_perl.c --- src/modules/perl/mod_perl.c 17 Mar 2003 02:15:09 -0000 1.157 +++ src/modules/perl/mod_perl.c 18 Mar 2003 22:55:08 -0000 @@ -190,6 +190,11 @@ ); #endif
+ av_push(GvAV(PL_incgv), + newSVpv(ap_server_root_relative(p, ""), 0)); + av_push(GvAV(PL_incgv), + newSVpv(ap_server_root_relative(p, "lib/perl"), 0)); + if (!modperl_config_apply_PerlRequire(s, scfg, perl, p)) { exit(1); }
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com