Open wagnerflo opened 5 years ago
Thanks for the report. My assumption is that the system cp
performs better than the Perl emulation in File::Copy::cp
, and handles permissions cases better, but I haven't really verified any of that. I agree that it makes error checking more difficult (the caller doesn't know whether it should check $?
or $@
or $!
or what).
Would using File::Copy::cp
work better in your use case, and if so, do you know a performance comparison?
Yes. For now I've replaced copy_to
with File::Copy::cp
and can handle and log errors like that. I have no idea about performance, though.
Since on Unix platforms
Path::Class::File::copy_to
usessystem()
to runcp
handling (or even logging) copy errors is impossible in my daemon: Thecp
writes it's error messages to a stderr that has been closed long ago...