Subject: | basename() should return a Path::Class object |
Date: | Wed, 23 Dec 2009 17:39:42 -0800 |
To: | bug-Path-Class [...] rt.cpan.org |
From: | Michael G Schwern <schwern [...] pobox.com> |
use Path::Class;
my $file = file("/foo/bar/baz")->basename;
$file->relative("/new/dir");
I was surprised to find that $file was not a Path::Class object. This breaks
the magic of Path::Class, which is to have ubiquitous file and directory
objects without having to convert strings.
I haven't investigated, but other methods might have the same problem.
--
package Outer::Space; use Test::More tests => 9;