Subject: | FindBin::libs abspath fails under cygwin |
First, nice module! Very handy!
Unfortunately, I have run into issues with FindBin::libs when run under
cygwin. I believe it is due to abs_path die-ing when a path does not
exist. It appears that the issue was partially addressed in the
find_libs routine when searching subdir's, but there are two other calls
to abs_path that I needed to wrap in an eval in order to get the tests
to pass.
I have attached a patch that passes tests on both a cygwin and linux box.
Thanks again,
Mark
System details:
FindBin-libs-1.35
CYGWIN_NT-5.1 xx 1.5.25(0.156/4/2) 2007-12-14 19:21 i686 Cygwin
This is perl, v5.8.8 built for cygwin-thread-multi-64int
(with 8 registered patches, see perl -V for more detail)
Subject: | FindBin-libs-1.35-cygwin.patch |
diff -Naur FindBin-libs-1.35/lib/FindBin/libs.pm FindBin-libs-1.35-cygwin-patch/lib/FindBin/libs.pm
--- FindBin-libs-1.35/lib/FindBin/libs.pm 2007-03-30 10:04:26.000000000 -0700
+++ FindBin-libs-1.35-cygwin-patch/lib/FindBin/libs.pm 2008-01-08 10:05:15.000000000 -0800
@@ -174,7 +174,8 @@
# to eval the check for subdir's.
my $abs
- = abs_path catpath $vol, ( catdir @dirpath, $base ), $empty;
+ = eval { abs_path catpath $vol, ( catdir @dirpath, $base ), $empty }
+ || '';
my $sub
= $subdir
@@ -281,7 +282,7 @@
for( @{ $argz{ ignore } } )
{
- if( my $dir = abs_path catdir $_, $base )
+ if( my $dir = eval { abs_path catdir $_, $base } )
{
if( -d $dir )
{