Open
Description
Module: File::Copy
Description
When File::Copy::copy
returns 0 (error) due to identical files, it does not set $!
.
Steps to Reproduce
perl -MFile::Copy -e '$! = 0; File::Copy::copy("/dev/null","/dev/null") or die "Copy failed: $! (\$! = ".int($!).")";'
which gives:
'/dev/null' and '/dev/null' are identical (not copied) at -e line 1.
Copy failed: ($! = 0) at -e line 1.
Expected behavior
$!
should be different from 0 (perhaps 1) as the module documents:
All functions return 1 on success, 0 on failure.
$! will be set if an error was encountered.
The bug is still present in
Lines 91 to 94 in 1edc2b4
Note: I found that this issue was mentioned in latexmk 4.85.