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: 53309
Status: new
Priority: 0/
Queue: Path-Class

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

Bug Information
Severity: Wishlist
Broken in: 0.18
Fixed in: (no value)



Subject: Option to autodie
It would be handy if Path::Class consistently threw exceptions on failure, that would maximize its convenience.

Alas, that would bust compatibility.  It could be set on object creation, but that would also be inconvenient.  Using a lexical pragma "use Path::Class ':autodie'" could make all Path::Class objects in scope autodie.  This lexical pragma would basically just flip a $DIE flag inside Path::Class.

An alternative is to put the autodie flag per object, that could be done by exporting the appropriate file() or dir() depending on if ":autodie" is given.  This isn't as good a solution because Path::Class objects may be created outside the code in question, for example passed in as arguments, and you want them to behave consistently regardless of origin.

Thoughts?