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

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

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



Subject: absolute file/dir constructors
Download (untitled) / with headers
text/plain 751b
The syntax for constructing absolute files ( file('', $a, $b, $c) ) is not declarative, even though this is a common task and the difference between relative and absolute files is important. There should be two new convenience functions: sub abs_file { my @path_elements = @_; return file('', @path_elements); } and sub abs_dir { my @path_elements = @_; return dir('', @path_elements); } It might even be nice to have rel_file and rel_dir as aliases for file and dir - potentially with the difference that they _never_ construct absolute files/dirs, even if the first element is an empty string (so that rel_file('', 'this', 'that') would simply result in a file representing ".//this/that" - which of course is legal).


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.