Subject: | FindBin::Real not getting real path under mod_perl |
I am attempting to use the FindBin::Real in a perl script that runs
under mod_perl. Here is some Perl code that illustrates the problem:
#!/usr/bin/perl
use FindBin::Real qw(Bin);
use lib Bin() . '../../libXX';
print Bin() . '../../libXX';
use MyModule ;
If I run this from the command it prints out the line
/home/joeuser/lib../../libXX
which is correct. However, when I try to do a PerlRequire of this file
in my Apache configuration file, I get the error
Can't locate MyModule.pm in @INC (@INC contains: /../../libXX
/usr/lib/perl5/5.8.0/i386-linux-thread-mul
ti /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i38 etc.
Note that the first path in the @INC array seems to have dropped off the
/home/joeuser prefix.
The platform is RedHat Enterprise Linux 3 with the standard software
that comes with that plaform (perl 5.8.0, Apache 2, etc.) I am using the
Perl package FindBin::Real version 1.04 downloaded from CPAN.