Hi,

Shouldn't the code in the FindBin.pm patches #24375 and #24379 be
also applied to the true block of "if($0 eq '-e' || $0 eq '-')" ?

----------
--- FindBin.pm.145      2005-05-03 13:46:43.000000000 +0100
+++ FindBin.pm  2005-05-12 20:20:22.000000000 +0100
@@ -113,8 +113,11 @@
   {
    # perl invoked with -e or script is on C<STDIN>

+   my $cwd = getcwd();
+   defined $cwd or $cwd = cwd(); # try harder
+
    $Script = $RealScript = $0;
-   $Bin    = $RealBin    = getcwd();
+   $Bin    = $RealBin    = $cwd;
   }
  else
   {
----------

Thanks in advance,
jpo


References
======================================================================

FindBin: development version:

   http://public.activestate.com/gsar/APC/perl-current/lib/FindBin.pm

FindBin.pm: last relevant changes:

[19] 24379 on 2005/05/03 by [EMAIL PROTECTED]
     http://public.activestate.com/cgi-bin/perlbrowse?patch=24379

    Error in the latest FindBin patch, noticed by Nicholas


[18] 24375 on 2005/05/03 by [EMAIL PROTECTED]
     http://public.activestate.com/cgi-bin/perlbrowse?patch=24375

    Fix for [perl #34252] Access rights in FindBin::Bin
    At least on my platform, Cwd::getcwd doesn't find the current
    directory if it has no access to it. Try harder with Cwd::cwd.

-- 
José Pedro Oliveira
* mailto: [EMAIL PROTECTED] * http://gsd.di.uminho.pt/~jpo *
* gpg fingerprint = F9B6 8D87 859D 1C94 48F0 84C0 9749 9EB5 91BD 851B *

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to