File::Specのハマった仕様

splitdir("/foo/bar") が ("", "foo", "bar") を返す

Unlike just splitting the directories on the separator, empty
directory names ('') can be returned, because these are significant on
some OSes.

canonpath()はパス中のsymlinkを解決してくれない

Note that this does *not* collapse x/../y sections into y. This is by
design. If /foo on your system is a symlink to /bar/baz, then
/foo/../quux is actually /bar/quux, not /quux as a naive ../-removal
would give you. If you want to do this kind of processing, you
probably want "Cwd"'s "realpath()" function to actually traverse the
filesystem cleaning up paths like this.

TODO

あとで追記