develooper Front page | perl.perl5.porters | Postings from April 2008

Re: One less File::Copy bug

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
April 27, 2008 08:48
Subject:
Re: One less File::Copy bug
Message ID:
20080427154819.GB19658@klangraum.plasmasturm.org
* Johan Vromans <jvromans@squirrel.nl> [2008-04-27 15:15]:
> Abigail <abigail@abigail.be> writes:
> > On Thu, Apr 24, 2008 at 06:18:12PM +0100, Nicholas Clark wrote:
> > > I'm surprised how long it took us to make such an easy fix.
> > 
> > I remember offering many years ago to fix this, but then it
> > wasn't deemed a bug - it was 'documented' to behave like
> > this.
> > 
> > And I'm offering to fix the permission bit issues, unless
> > we're too afraid it will break existing code. (Someone,
> > somewhere, is probably relying in File::Copy dropping the
> > execution bit).
> 
> Wouldn't it be better to provide a new, incompatible but less
> surprising version of File::Copy next to the old one?
> 
> Or even, make it dual-faced depending on the version required?

Not in this case. We already have two different functions, `copy`
and `syscopy`, of which the latter is meant to DTRT but in fact
is a synonym for `copy` on Unix. If anyone is using it in favour
of `copy` but still relying on the dropped permission bits, well,
I won’t feel terribly sorry about their code breaking.

What might then be sensible is to add an import flag to say “give
me `syscopy` where I ask for `copy`” once it is fixed.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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