Open djerius opened 1 year ago
copy and move ignore the Path::Tiny-ness of what is passed to them, treating their argument as a string.
copy
move
Path::Tiny
If they recognized a Path::Tiny file object and returned it, that would prevent the following foot-gun:
$temp_copy = path('/etc/motd')->copy( Path::Tiny->tempfile );
I don't think it's possible to avoid this one:
$temp_copy = path('/etc/motd')->copy( Path::Tiny->tempdir );
copy
andmove
ignore thePath::Tiny
-ness of what is passed to them, treating their argument as a string.If they recognized a
Path::Tiny
file object and returned it, that would prevent the following foot-gun:$temp_copy = path('/etc/motd')->copy( Path::Tiny->tempfile );
I don't think it's possible to avoid this one:
$temp_copy = path('/etc/motd')->copy( Path::Tiny->tempdir );