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

Re: One less File::Copy bug

Thread Previous | Thread Next
Aristotle Pagaltzis
April 27, 2008 08:48
Re: One less File::Copy bug
Message ID:
* Johan Vromans <> [2008-04-27 15:15]:
> Abigail <> 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.

Aristotle Pagaltzis // <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About