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

Re: Recommended file-copying method

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
July 7, 2013 14:04
Subject:
Re: Recommended file-copying method
Message ID:
CAHhgV8iM02AMX4Y=EbArSe9FAp4d7zfFXuPNhzBxuUUdJfsiZQ@mail.gmail.com
On Sun, Jul 7, 2013 at 5:20 AM, Ken Williams <kenahoo@gmail.com> wrote:
> I'm about to add a $file->copy($destination) method to Path::Class.  I was
> about to use File::Copy's copy() function, but then I noticed the cp() and
> syscopy() alternatives, each of which has additional niceties (the former
> preserves permissions - the latter seems to DTRT better on Windows and other
> non-Unixalikes) but neither has both niceties people probably want.

I don't think this makes much sense as a method. Copying is not an
operation of one subject, but one of two equals. Or said otherwise,
why would it be a method of the source and not of the destination?

Leon

Thread Previous | 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