laziness, impatience, and hubris | |
PerlMonks |
Re: File::Copy versus cp/mvby Abigail-II (Bishop) |
on Oct 01, 2003 at 15:59 UTC ( [id://295663]=note: print w/replies, xml ) | Need Help?? |
"Portability" between platforms is the strongest argument in favour of File::Copy.
"Portability" on the same platform (as in "behave the same
as other applications do") is a strong argument in favour of
using cp.
Personally, I favour 'rename' for renaming files within the same filesystem, 'system mv' for moving files over filesystem boundaries, and 'system cp' for copying files. My main beef I have against File::Copy is that it doesn't it doesn't respect execution bits. Furthermore, 'cp' (and 'mv') can take multiple arguments (moving or copying a bunch of files into a directory), and options (-a, -f, -R). Oh, and the last argument of 'cp' can be a directory, which I find extremely useful. Perhaps File::Copy::copy can too, but not according to its manual page. On a more abstract level, why are you trying to convince your coworkers to stop using system? You can't even come up with reasons they should - you are asking here for arguments in your favour! If you can't find convincing arguments yourself, it may be a sign you are not fighthing a worthwhile battle. Abigail
In Section
Seekers of Perl Wisdom
|
|