moo@cow~>perldoc -m Path::Tiny | ack File::Spec use File::Spec 3.40 (); my $cpath = $path = File::Spec->canonpath($path); #pod Gives you C<< File::Spec->rootdir >> as a C object if you're too sub rootdir { path( File::Spec->rootdir ) } @{$self}[ VOL, DIR, FILE ] = File::Spec->splitpath( $self->[PATH] ); #pod in L would normally do so on your platform. If you need them #pod like C or C from File::Spec, but without caring about #pod C<< File::Spec->splitpath( $path->stringify ) >> or C<"."> for a path without a #pod parent directory portion. Because L is inconsistent, the result #pod C<< File::Spec->abs2rel() >>. # Easy to get wrong, so wash it through File::Spec (sigh) sub relative { path( File::Spec->abs2rel( $_[0]->[PATH], $_[1] ) ) } #pod equivalent to what L would give from C and thus friendlier to use than L and provides easy access to functions from Gives you C<< File::Spec->rootdir >> as a C object if you're too in L would normally do so on your platform. If you need them like C or C from File::Spec, but without caring about C<< File::Spec->splitpath( $path->stringify ) >> or C<"."> for a path without a parent directory portion. Because L is inconsistent, the result C<< File::Spec->abs2rel() >>. equivalent to what L would give from C and thus