Subject: | basename returns '' for the root instead of '/' |
I got an email from Zev Benjamin stating:
Hi Andrew,
I've been using the various File::System modules for a project of mine
and noticed that calling basename on a File::System::Object that is the
root of the file system returns the empty string. This stems from the
fact that File::Basename, which your modules use, have this behavior.
There has been Perl mailing list traffic that indicates that the
behavior is unlikely to change due to backwards compatibility reasons.
However, it is still arguably the incorrect bahavior. I just wanted to
bring this to your attention and ask whether your modules' behavior are
likely to change in the future with respect to basename. Also note that
the POD for File::System::Object states under dirname, 'If the object
represents the root path of the file system (i.e., .. = .), then it is
possible that "basename" = "dirname" = "path".'
Zev