develooper Front page | perl.perl5.porters | Postings from September 2013

[perl #116451] File::Copy::syscopy doesn't preserve attrs as intended on Linux

Thread Next
From:
Ricardo SIGNES via RT
Date:
September 6, 2013 02:06
Subject:
[perl #116451] File::Copy::syscopy doesn't preserve attrs as intended on Linux
Message ID:
rt-3.6.HEAD-1873-1378433175-1953.116451-15-0@perl.org
I have re-visited this ticket and had a look at the documentation for syscopy, which reads like 
this:

           File::Copy also provides the "syscopy" routine, which copies the
           file specified in the first parameter to the file specified in the
           second parameter, preserving OS-specific attributes and file
           structure.  For Unix systems, this is equivalent to the simple
           "copy" routine, which doesn't preserve OS-specific attributes.  For
           VMS systems, this calls the "rmscopy" routine (see below).  For
           OS/2 systems, this calls the "syscopy" XSUB directly. For Win32
           systems, this calls "Win32::CopyFile".

I don't think I have a change to suggest that is worth making.  The "For Unix systems" bit is so 
close to the previous statement that I'm not sure any clarification is needed.  We could change 
the "Unix systems" to "systems other than OS/2, VMS, and Win32."

I worry that considering changing the behavior of syscopy, in the future, is going to make it less 
and less reliable, rather than suddenly doing what people want.

Abigail has, if I recall correctly, been recommending just executing `cp -p` for years.  I think 
this may be the best advice for people seeking the behavior they know on their platform.

-- 
rjbs

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=116451

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About