Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Path-Class CPAN distribution.

Maintainer(s)' notes

I prefer that bugs & patches are filed on GitHub rather than on RT: https://github.com/kenahoo/Path-Class/issues. Thanks.

Report information
The Basics
Id: 72268
Status: resolved
Priority: 0/
Queue: Path-Class

People
Owner: Nobody in particular
Requestors: DATA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.24
Fixed in: (no value)



Subject: ->resolve should croak on non existant file
Hi, The current behaviour of ->resolve is not very helpful: $ perl -MPath::Class -e 'dir("/foo")->resolve' No such file or directory at /home/danielt/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/Path/Class/Entity.pm line 66. The attached patch fixes that: $ perl -Ilib -MPath::Class -e 'dir("/foo")->resolve' No such file or directory at -e line 1 Cheers, Danijel
Subject: path-croak.diff
Index: lib/Path/Class/Entity.pm =================================================================== --- lib/Path/Class/Entity.pm (revision 236) +++ lib/Path/Class/Entity.pm (working copy) @@ -5,6 +5,7 @@ use File::Spec 0.87; use File::stat (); use Cwd; +use Carp(); use overload ( @@ -60,7 +61,7 @@ sub resolve { my $self = shift; - die $! unless -e $self; # No such file or directory + Carp::croak($!) unless -e $self; # No such file or directory my $cleaned = $self->new( scalar Cwd::realpath($self->stringify) ); # realpath() always returns absolute path, kind of annoying
Thanks, applied. -Ken
On Tue Nov 08 08:22:10 2011, KWILLIAMS wrote: Show quoted text
> Thanks, applied.
Great. Release please! ;)
Oops. Thanks for the nudge. Released.