On Thu, Sep 20, 2007 at 11:48:15AM +0200, demerphq wrote:
> On 9/20/07, flw <[EMAIL PROTECTED]> wrote:
> > C:\>cat ttt.pl
> > use strict;
> > use warnings;
> >
> > {
> >   my $x = 'A';
> >   sub f { sub { $x++ }       }
> >   sub g { sub { $x++ } if $x }
> > }
> >
> > my $F=f();
> > my $G=g();
> >
> > print $F->(),$G->(),"," for 1..4;
> > print "\n";
> >
> > C:\>ttt.pl
> > 0A,1B,2C,3D,
> >
> > C:\>
> 
> Known bug in closure implementation.

which is fixed in 5.9.0 onwards/

-- 
Gravity is just a theory; teach Intelligent Falling in our schools!
    http://www.theonion.com/content/node/39512

Reply via email to