develooper Front page | perl.perl5.porters | Postings from June 2010

Re: 5.13.1 localized tied X no longer tied breaks File::chdir

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
June 7, 2010 14:35
Subject:
Re: 5.13.1 localized tied X no longer tied breaks File::chdir
Message ID:
20100607213426.GC2988@iabyn.com
On Sun, May 23, 2010 at 03:19:14PM +0100, Dave Mitchell wrote:
> On Fri, May 21, 2010 at 10:30:39PM -0400, David Golden wrote:
> > I'm sorry I missed this thread the first time around or didn't realize
> > the implications:
> > 
> >     http://www.xray.mpe.mpg.de/cgi-bin/w3glimpse2html/perl5-porters/2010-04/msg00561.html
> > 
> > Ironically, I think the original bug was reported by Schwern because
> > "local @CWD" didn't work in File::chdir.   The resulting change means
> > that remaining use of local with File::chdir is now broken:
> > 
> >      use File::chdir;
> >      $CWD = "/foo";      # it's /foo out here.
> >      {
> >          local $CWD = "/bar";  # /bar in here
> >      }
> >      # still /foo out here!
> > 
> > While I co-maintain File::chdir, I don't have a strong opinion about
> > whether the changes should be reverted, but if not, I'll need to have
> > better documentation of the 5.13+ limitations.
> > 
> > For reference, the relevant commits are:
> > 
> >     commit 191ad7eff570fc96c93993e4358f83e2033365d6
> >     commit 5afa72af5aa99c40932771ad390abf5ba229611b
> 
> The first commit of mine fixed @tied and %tied, upon which there was a
> consensus, especially as the existing behaviour didn't do anything useful.
> The second commit, which did the same for $tied, was a bit of an
> after-thought, with no real discussion. Given that it breaks existing
> "reasonable" behaviour, I'm now strongly tempted to revert it (but to
> leave the @tied/%tied change).

Now reverted with 89adf4e8e0de17fedf78328b32920f47635850d0,
documented with 5f3e44b689cab8bd7cec81aa6fc21c2ec5b3489f.

If people want to work to a consensus on what a LOCALISE method might do,
I'll implement it; in the meantime, I think its best to stick with the old
behaviour.

-- 
Justice is when you get what you deserve.
Law is when you get what you pay for.

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