This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move cp(1)-like permission changes from copy to cp,
authorCharles Bailey <bailey.charles@gmail.com>
Sat, 24 Jan 2009 00:11:45 +0000 (19:11 -0500)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 25 Jan 2009 14:06:45 +0000 (15:06 +0100)
commite63b33793c3cf76a134a6446d1f83479e030a15f
tree868a88326814eb559c43b5342e4b4f8c51fdf3b2
parent076a2a80a09d79b056f73d9ef04bd4d977712fce
Move cp(1)-like permission changes from copy to cp,

and add setid bit handling

- Moves the permission-changing code to File::Copy::cp(), making it
non-identical to File::Copy::copy().  I think this is a decent
compromise, retaining backwards compatibility in the "primary"
routine, while allowing people who chose cp() to get more POSIXy
semantics.  It does break backwards compatibility of cp() wrt
permissions.  I can find a handful of examples in CPAN, for which I
hope smokers will give some feedback.  As for the DARKpan, who knows .
. .

- Expands the permission changing in cp() a bit to cover the rest of
what cp(1) claims on the local POSIX box.

- Removes Fcntl from the mix, to eliminate some build-time hoops.

- Shifts Abigail's permission tests to cp(), and adds parallel tests for copy().

- Documents the permission-related behavior in more detail.
lib/File/Copy.pm
lib/File/Copy.t