You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if path( $dir )->chdir worked and threw exception if chdir failed (its like autodie)
otoh, you have hardcoded '.' and '..' in sub children , but for portability, you should probably use File::Spec->curdir and File::Spec->updir, because on some systems they aren't '.' and '..' like File::Spec::VMS and File::Spec::Mac
hmm, so how to get '.' path( File::Spec->curdir ) is kinda lettery path( ['curdir'] ) path( ['.'] ) path( \'.' ) path( \'..' )
Thanks
The text was updated successfully, but these errors were encountered:
If I understand correctly, you want $path->chdir for the exception on failure? Rather than:
use autodie;
chdir $path;
I've tried to avoid replicating all the built-in functions when there isn't additional functionality (or simplicity) to be gained from it. I'll think about it. (Actually, I'll open a separate ticket for it: #82)
Path::Tiny isn't intended to be maximally portable -- and is documented so. It attempts to use File::Spec as little as possible due to the overhead of it, so it will continue using "." and "..". I'm going to close this ticket, but I'll leave the new chdir one open for consideration.
It would be nice if path( $dir )->chdir worked and threw exception if chdir failed (its like autodie)
otoh, you have hardcoded '.' and '..' in sub children , but for portability, you should probably use File::Spec->curdir and File::Spec->updir, because on some systems they aren't '.' and '..' like File::Spec::VMS and File::Spec::Mac
hmm, so how to get '.'
path( File::Spec->curdir )
is kinda letterypath( ['curdir'] )
path( ['.'] )
path( \'.' )
path( \'..' )
Thanks
The text was updated successfully, but these errors were encountered: