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: Thanks.

Report information
The Basics
Id: 53309
Status: new
Priority: 0/
Queue: Path-Class

Owner: Nobody in particular
Requestors: mschwern [...]

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

Subject: Option to autodie
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 870
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.


This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to