Subject: | abs_path croaks on missing paths, so FindBin::libs doesn't even compile! |
use FindBin::libs qw(base=conf export=conf_dirs noprint nouse);
makes FindBin::libs die (at least in MSWin32) with the following error:
<...>: No such file or directory at <...>/FindBin/libs.pm line 272
It's because of abs_path being used, which croaks (i.e. dies) for
missing paths. For MSWin32 (and some other OSes) abs_path is an alias
for fast_abs_path, whose implementation (latest PathTools 3.24)
contains:
sub fast_abs_path {
<...>
unless (-e $path) {
_croak("$path: No such file or directory");
}
<...>
}
I believe you should either avoid abs_path usage or at least eval it,
e.g.:
if( my $dir = eval { abs_path catdir $_, $base } )
<...>
"This is perl, v5.8.8 built for MSWin32-x86-multi-thread"
---------------------------------------------------
By the way, your module is pretty useful not only for autousing libs,
but for autodiscovering any directories along the bin path. I'd use it
for discovering conf directory staying in line with y bin directory if
it wonly worked. Really hope for your attention to this bug! Thanks!