Front page | perl.perl5.porters |
Postings from August 2011
Re: [perl #96158] File::Copy needs fixing
Thread Previous
|
Thread Next
From:
Abigail
Date:
August 3, 2011 00:14
Subject:
Re: [perl #96158] File::Copy needs fixing
Message ID:
20110803071402.GA8630@almanda
On Tue, Aug 02, 2011 at 05:44:38PM -0700, perl-diddler@Ishtar.sc.tlinx.org wrote:
> # New Ticket Created by perl-diddler@Ishtar.sc.tlinx.org
> # Please include the string: [perl #96158]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=96158 >
>
>
>
> This is a bug report for perl from perl-diddler,
> generated with the help of perlbug 1.39 running under perl 5.12.3.
>
>
> -----------------------------------------------------------------
> [Please describe your issue here]
>
> It looks like File::Copy is in the std distrib, and I'm using 5.12.
>
> In it's docs, it says the unix version is, basically, 'broken',
> and doesn't copy attributes, permissions/ date/times, acls, -- nothin.
> It provides, essentially, DOS-FAT32 style copying: preserving nothing.
>
> Instead of calling whatever broken routine that does this 'syscopy'?
> (couldn't find it in 'apropos' and it's not a system call...hmmm..)
> maybe it should just call the local 'cp -a' command to do the copy,
> as it will copy links, preserve hard links, and as much of the metadata
> as it can, i.e. 'all', for
>
> all: ⊇ ⟦mode, ownership timestamps, xattr, links, [security] context, all⟧
>
> i.e. 'File::Copy' should do at least as well as the system's standard
> copy routine...dunnow what 'syscopy is' that it is documented to use,
> as 'syscopy' doesn't turn up any manpages on my system.
>
> Does syscopy mean 'use the system's 'cp' program?
>
> In which case, maybe it should use the "-a" flag"?
>
In File::Copy 2.15 and later, there's a slight difference between 'copy',
and 'cp'. The latter will preserve the permission bits, as the system 'cp'
doest. It doesn't preserve timestamps (since a plain 'cp' doesn't do so
either).
Perl 5.14 comes with a File::Copy that has the above.
Abigail
Thread Previous
|
Thread Next