Subject: | absolute file/dir constructors |
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).