App-MaMGal
view release on metacpan or search on metacpan
lib/App/MaMGal/EntryFactory.pm view on Meta::CPAN
}
sub canonicalize_path($)
{
croak "List context required" unless wantarray;
my $path = shift;
# Do some path mangling in two special cases:
if ($path eq '.') {
# discover current directory name, so that it looks nice in
# listings, and we know where to ascend when retracting towards
# root directory
$path = Cwd::abs_path($path);
} elsif ($path eq '/') {
# mangle the path so that the following regular expression
# splits it nicely
$path = '//.';
}
# Split the path into containing directory and basename, stripping any trailing slashes
( run in 0.409 second using v1.01-cache-2.11-cpan-64827b87656 )