This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Proposed addition to File::Copy: move
authorCharles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>
Sat, 14 Dec 1996 05:27:29 +0000 (00:27 -0500)
committerChip Salzenberg <chip@atlantic.net>
Thu, 19 Dec 1996 04:44:00 +0000 (16:44 +1200)
commit441496b2b4814536730a7c97d893a728a76c0c9d
treed45fde64b4d1bb477f362a6dca27143c9f18d809
parente1f0c0aa312112c4a139416a2dda63880ddd621a
Re: Proposed addition to File::Copy: move

In article <1996Dec11.184718.1613163@hmivax>, bailey@genetics.upenn.edu (Charles Bailey) writes:
> It's been mentioned a couple times that a file renaming function with
> semantics similar to the Unix "mv" command (rename if possible, else
> copy) would be a nice addition to File::Copy.  Here's a patch; what
> do people think of it?  (It also includes changes to make File::Copy
> 'strict' and '-w' clean.)

Of course, seconds after I post the patch, I find a case where rename()
returns ENODEV instead of EXDEV for a cross-device copy.  Appended is
a patch which allows this; if the target device really doesn't exist,
copy() will prompylt fail with the same error.

p5p-msgid: <1996Dec11.185807.1613164@hmivax.humgen.upenn.edu>
private-msgid: <01ICZBN0LRC8001A1D@hmivax.humgen.upenn.edu>
lib/File/Copy.pm
t/lib/filecopy.t