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

[perl #120619] Clarification for File::Copy documentation

From:
rrt @ sc3d . org
Date:
November 23, 2013 22:11
Subject:
[perl #120619] Clarification for File::Copy documentation
Message ID:
rt-4.0.18-18883-1385244665-392.120619-75-0@perl.org
# New Ticket Created by  rrt@sc3d.org 
# Please include the string:  [perl #120619]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=120619 >


File::Copy's documentation says about syscopy: "For Unix systems, this is
equivalent to the simple "copy" routine, which doesn't preserve OS-specific
attributes."

Does this mean that syscopy is like copy, and not like cp, where, according
to the same documentation, "as of version 2.15, <cp> will preserve the
source file's permission bits like the shell utility cp(1) would do"? That
would not seem very logical.

Also, the phrase "doesn't preserve OS-specific attributes" is confusing
when talking about a particular OS: when reading the page, I wondered if it
referred to file-system-specific attributes on UNIX. Maybe it's better just
to leave it out.

Assuming that sanity prevails under the hood, and syscopy is equivalent to
cp, I suggest rewriting this as:

"For Unix systems, this is equivalent to the simple "cp" routine."

If for some reason syscopy on Unix works the same as "copy", then instead:

"For Unix systems, this is equivalent to the simple "copy" routine, and
doesn't preserve attributes."

(Checked against latest version at http://perldoc.perl.org/File/Copy.html)

-- 
http://rrt.sc3d.org




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