in reply to Re: perl 5.16.0 released!
in thread perl 5.16.0 released!

On why it's good...

This leaks:

sub outer { ... my $inner; $inner = sub { ... $inner->(...); ... }; $inner->(...); }

This doesn't:

sub outer { ... my $inner = sub { ... __SUB__->(...); ... }; $inner->(...); }

Replies are listed 'Best First'.
Re^3: perl 5.16.0 released!
by Tanktalus (Canon) on May 25, 2012 at 20:55 UTC

    Oh, crap. That explains a bug I was fighting with for a week.

    Memory leaks are minor. Compared to guard objects that don't go out of scope at the right time, and hang around too long, having nasty side effects when their DESTROY is called at the wrong time.