develooper Front page | perl.perl5.porters | Postings from December 2011

Re: [perl #106864] refcount for anonymous sub is 2 instead of 1

Thread Previous | Thread Next
From:
Eric Brine
Date:
December 24, 2011 15:46
Subject:
Re: [perl #106864] refcount for anonymous sub is 2 instead of 1
Message ID:
CALJW-qGCKzttT0PQ6aaNDDsWTz7F_MC735=2BwKLtYfC-XtbLg@mail.gmail.com
2011/12/22 Olivier Mengué <perlbug-followup@perl.org>

> # New Ticket Created by  Olivier Mengué
> # Please include the string:  [perl #106864]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=106864 >
>
>
> This is a bug report for perl from dolmen@cpan.org,
> generated with the help of perlbug 1.39 running under perl 5.10.1.
>
>
> -----------------------------------------------------------------
>
>
> With the following expression:
>
>    my $x = sub { };
>
> the refcount of $x is 2 instead of 1.
>
There is no such problem if the sub, instead of behind a simple sub,
> is a closure.
>

What problem?

- Eric

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