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

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

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



Subject: RFE: shorter synonyms for absolute & relative files and dirs
I find myself frequently switching to absolute pathnames. It's frustrating to have to sprinkle "->absolute" everywhere. E.g. for current directory, "dir()->absolute". I'd love to have a shorter synonym, e.g. "abs()". relative() could also be rel(). E.g. "dir()->abs". Another good (and easy) possibility might be to implement "absdir" and "absfile" to just wrap "dir" and "file" to return the absolute versions of each. Those functions would maintain brevity and clarity. I thought about being able to request absolute filenames as the default rather than relative in the import of Path::Class. E.g.: use Path::Class ':ABSOLUTE'; However, a toggle like this to the API could be a source of confusion to those later reading/maintaning the code, so I'm not sure if it's actually a good idea. (Mentioned just for completeness of my brainstorming.)