No, clearly every gensym object occupies a new GEN# slot in the Symbol package. Also - DESTROY is completely innappropriate here. You cannot call ->DESTROY on an object and have it actually free the object. The ->DESTROY method is called by perl when the object is being destroyed - you can't provoke it by calling it yourself.
perl -MB -MSymbol -e '$,=$\="\n";push @A,gensym for 0 .. 10;@B=map B::svref_2object($_), @A; print $_->STASH->NAME."::".$_->NAME for @B'In reply to Re: Re: Re: Perl Object as Hash, Array & Scalar in the same time! ( $O->{k} | $O->[0] | $O )
by diotalevi
in thread Perl Object as Hash, Array & Scalar in the same time! ( $O->{k} | $O->[0] | $O )
by gmpassos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |