develooper Front page | perl.perl5.porters | Postings from December 2004

[perl #33148] Found a problem with FindBin.pm 1.43 Perl 5.8.0

Thread Previous | Thread Next
From:
Benjamin Elbirt
Date:
December 21, 2004 14:39
Subject:
[perl #33148] Found a problem with FindBin.pm 1.43 Perl 5.8.0
Message ID:
rt-3.0.11-33148-103407.7.72950964609748@perl.org
# New Ticket Created by  "Benjamin Elbirt" 
# Please include the string:  [perl #33148]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=33148 >


This may also exist in later versions:
 
I am using CGI::SSI with Apache/Mod_Perl 1.33/1.29 and I got this error:
Cannot find current script '/dev/null' at /usr/lib/perl5/5.8.0/FindBin.pm
line 180
 
After much painstaking searching I figure it out
 
Line 153:
croak("Cannot find current script '$0'") unless(-f $script);
 
Apache loads $script as /dev/null and it thus fails the -f test.
 
I commented out the line as it fixed the problem and this only happened with
Apache/Mod_perl (command line SSI worked fine)
 
I'm wondering if there is a way to catch the Apache usage and ignore the -f
or do a different check.

Thanks,
 
Benjamin Elbirt
Perl Programmer, 8 years

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About