Skip Menu |

This queue is for tickets about the FindBin-libs CPAN distribution.

Report information
The Basics
Id: 24946
Status: resolved
Worked: 30 min
Priority: 0/
Queue: FindBin-libs

People
Owner: LEMBARK [...] cpan.org
Requestors: nikita.dedik [...] bulyon.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.33
Fixed in: (no value)



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!
Show quoted text
> it wonly worked. Really hope for your attention to this bug! Thanks!
I don't have any windows systems to test this on, but on *NIX abs_path does not croak on an invalid path. I've added an eval to the abs_path for checking subdir's (the abs_path for components of the current directory should not be able to fail). FB::l-1.34 should be avaialble on CPAN today sometime.
Fixed in 1.34; added eval to abs_path for windows cases.