From: Abigail Date: 00:51 on 21 Sep 2005 Subject: File::Copy --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Another of those Perl modules that should never have been made. A favourite of the perlmonks crowd (perlmonks is to Perl what slashdot is to computer geeks in general -- the shine attracts the teenagers,=20 but it ain't very useful); it has worked itself into the main Perl distribution, and someone has had a lot of success in passing the kool-aid. Nowadays, if you dare to write: system cp =3D> $src, $dest; on most Perl forums, Perl nitwits pop up their heads from under their rocks and flame you for not being 'pure perl', and for writing code that doesn't run on their Billware. No, they say, you ought to use File::Copy. Now, this rant isn't about File::Copy's rather limited capabilities compared to 'cp'. Using a directory as a destination is beyond its capabilities, and File::Copy::copy ($file1, $file2, $dir) will complain, but destroy your $file2 anyway. Not to mention it doesn't have support for equivalences of 'cp -r', 'cp -p' or any of the other options you'll have with 'system'.=20 Nor is this rant about the fact File::Copy also provides a 'syscopy' routine, but doesn't actually export 'syscopy'. No, I hate File::Copy because when copying a executable, it loses the=20 execution bit. Having been bitten by that 'feature' in the past, I haven't used File::Copy for a long, long time. But I'm not the only person using Perl at the company I work for. Had a long debugging session today -- which ended with replacing File::Copy with 'system "cp"'. Abigail --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFDMKCMBOh7Ggo6rasRAvwYAJ9SGtY7mMdGSliZN7aN2ztZgwoUdQCeIeSD nmqNlNg+wjFgXMGCshb3WaU= =kj08 -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC--
From: Juerd Date: 11:12 on 21 Sep 2005 Subject: Re: File::Copy Abigail skribis 2005-09-21 1:51 (+0200): > (perlmonks is to Perl what slashdot is to computer geeks in general -- > the shine attracts the teenagers, but it ain't very useful); (That's only partly true. Perlmonks certainly can be useful, and has been very useful for many people. It may not be useful for YOU, but overall, it certainly and unarguably is useful.) > Nowadays, if you dare to write: > system cp => $src, $dest; > on most Perl forums, Perl nitwits pop up their heads from under their rocks > and flame you for not being 'pure perl', I'd be more concerned with the possibility of having -arguments in $src (or, if GNU cp is used, in $src or $dest), and with the 4-letterness of $dest with the 3-letterness of $src :) > No, I hate File::Copy because when copying a executable, it loses the > execution bit. Having been bitten by that 'feature' in the past, > I haven't used File::Copy for a long, long time. But I'm not the only > person using Perl at the company I work for. Had a long debugging > session today -- which ended with replacing File::Copy with 'system "cp"'. ++ This has annoyed me too, and I too have not used F::C for years. Juerd
Generated at 10:26 on 16 Apr 2008 by mariachi