stas 2004/03/12 17:59:47 Modified: src/docs/1.0/guide snippets.pod src/docs/general/perl_reference perl_reference.pod Log: good news: FindBin works under mod_perl Revision Changes Path 1.15 +4 -1 modperl-docs/src/docs/1.0/guide/snippets.pod Index: snippets.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/1.0/guide/snippets.pod,v retrieving revision 1.14 retrieving revision 1.15 diff -u -u -r1.14 -r1.15 --- snippets.pod 21 Dec 2002 02:04:35 -0000 1.14 +++ snippets.pod 13 Mar 2004 01:59:47 -0000 1.15 @@ -438,7 +438,10 @@ C<BEGIN> block it won't work under mod_perl. It's loaded and executed only for the first script executed inside the process, all the others will use the cached value, which would be probably incorrect if they -reside in different directories. +reside in different directories. Perl 5.9.1 provides a new function +C<FindBin::again> which will do the right thing. Also the CPAN module +C<FindBin::Real> provides a working alternative working under +mod_perl. =head1 Watching the error_log File Without Telneting to the Server 1.4 +10 -6 modperl-docs/src/docs/general/perl_reference/perl_reference.pod Index: perl_reference.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/general/perl_reference/perl_reference.pod,v retrieving revision 1.3 retrieving revision 1.4 diff -u -u -r1.3 -r1.4 --- perl_reference.pod 15 Nov 2003 06:12:21 -0000 1.3 +++ perl_reference.pod 13 Mar 2004 01:59:47 -0000 1.4 @@ -1376,13 +1376,17 @@ scripts from development to a production server. There is a module called C<FindBin> which solves this problem in the -plain Perl world, but unfortunately it won't work under mod_perl, -since it's a module and as any module it's loaded only once. So the -first script using it will have all the settings correct, but the rest -of the scripts will not if located in a different directory from the -first. +plain Perl world, but unfortunately up untill perl 5.9.1 it won't work +under mod_perl, since it's a module and as any module it's loaded only +once. So the first script using it will have all the settings correct, +but the rest of the scripts will not if located in a different +directory from the first. Perl 5.9.1 provides a new function +C<FindBin::again> which will do the right thing. Also the CPAN module +C<FindBin::Real> provides a working alternative working under +mod_perl. -For the sake of completeness, I'll present this module anyway. +For the sake of completeness, I'll present the C<FindBin> module +anyway. If you use this module, you don't need to write a hard coded path. The following snippet does all the work for you (the file is
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]