On Fri, 4 Jan 2002, Ken Williams wrote: > > On Friday, January 4, 2002, at 02:48 AM, Gerald Richter wrote: > > >> # Won't get cleaned up properly > >> local %foo; > >> tie %foo, 'Dummy', name => '%foo'; > > > > local only make a copy of the original value and restores it at the end > > of > > the scope, so %foo will not destroyed, but restored at the end of the > > scope. > > I guess this is the reason my it still stays tied. > > AMS just posted this small test case to p5p: > > sub X::TIEHASH{bless{}} > { local %x; tie %x, "X" } print tied %x ? "a" : "b"; > > 5.004_03 prints "b", and 5.004_04 (and higher) prints "a". I think "b" > is the proper behavior, at least that's my opinion. Well, you can say I'm cold-hearted, but I think if you use every feature Perl has in one line, you can expect trouble. Apache::Session has a history of this. With every Perl < 5.6, it cause a segfault when calling die() from within TIEHASH. -jwb
- Apache::Session getting DESTROYed in wrong order Ken Williams
- Re: Apache::Session getting DESTROYed in wrong order Aaron E. Ross
- Re: Apache::Session getting DESTROYed in wrong o... Ken Williams
- Re: Apache::Session getting DESTROYed in wro... Perrin Harkins
- Re: Apache::Session getting DESTROYed in... Ken Williams
- Re: Apache::Session getting DESTROY... Perrin Harkins
- Re: Apache::Session getting DESTROYed in... Ken Williams
- Re: Apache::Session getting DESTROY... Gerald Richter
- Re: Apache::Session getting DES... Ken Williams
- Re: Apache::Session getting... Jeffrey W. Baker
- Re: Apache::Session getting DESTROY... Ken Williams
- Re: Apache::Session getting DES... Perrin Harkins
- Re: Apache::Session getting... Ken Williams
- Re: Apache::Session getting... Jay Lawrence
- Re: Apache::Session getting... Perrin Harkins
- Re: Apache::Session getting DESTROYed in wrong order Jeffrey W. Baker
- Re: Apache::Session getting DESTROYed in wrong o... Ken Williams