Which subroutine is never called? The one which is the last command in do block and which is thus stored in $code? It is called explicitly right after do block - (see $code->())
my $code = do { my $g; sub { $g = Scope::Guard->new( sub { warn "destroyed"; $x ; } ); } }; $code->();
In reply to Re^2: Reference to guard not released
by roman
in thread Reference to guard not released
by roman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |