X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFindBin.pm;h=8be9cb6b5af0659ab0bc41728de7e248e536199a;hb=da9d6c70552fb399d08aaf78dc7afc5fcc4907bf;hp=91958a80505af86e328ea0ea9affd0c3fcd89108;hpb=f5f423e4590905c45492eda1312cb2f76a6ef9a7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/FindBin.pm b/lib/FindBin.pm index 91958a8..8be9cb6 100644 --- a/lib/FindBin.pm +++ b/lib/FindBin.pm @@ -39,9 +39,23 @@ directory. $RealBin - $Bin with all links resolved $RealScript - $Script with all links resolved +=head1 KNOWN ISSUES + +If there are two modules using C from different directories +under the same interpreter, this won't work. Since C uses +C block, it'll be executed only once, and only the first caller +will get it right. This is a problem under mod_perl and other persistent +Perl environments, where you shouldn't use this module. Which also means +that you should avoid using C in modules that you plan to put +on CPAN. The only way to make sure that C will work is to force +the C block to be executed again: + + delete $INC{'FindBin.pm'}; + require FindBin; + =head1 KNOWN BUGS -if perl is invoked as +If perl is invoked as perl filename @@ -82,7 +96,7 @@ use File::Spec; %EXPORT_TAGS = (ALL => [qw($Bin $Script $RealBin $RealScript $Dir $RealDir)]); @ISA = qw(Exporter); -$VERSION = "1.42"; +$VERSION = "1.43"; BEGIN { @@ -107,7 +121,7 @@ BEGIN } else { - my $doshish = ($^O eq 'MSWin32' or $^O eq 'os2'); + my $dosish = ($^O eq 'MSWin32' or $^O eq 'os2'); unless(($script =~ m#/# || ($dosish && $script =~ m#\\#)) && -f $script) {