Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'll answer only to 1st item, because I see 2nd already resolved.
As best of my understanding, yes, ref count for $depth is increased when "sub recurse" is compiled. And if, say, we compiled anonymous sub as my $r=sub{$depth} and then $r goes away due to refcounting, I see that ref count for $depth will be decreased once (even if $depth was used several times inside that sub). Let me note that I just checked "perlsub" and see exactly your question explained at the section "Persistent Private Variables" Best wishes,
In reply to Re: Re: Re: sub and anonymous sub
by Courage
|
|