gam3 has asked for the wisdom of the Perl Monks concerning the following question:
I am wondering why it is that
never calls Foo->DESTROY.bless(sub {}, 'Foo');
And is this a well known feature of Perl OO?
perl -e '{package Foo; sub DESTROY { print "d\n"; } bless( {}, 'Foo'); +}' # d perl -e '{package Foo; sub DESTROY { print "d\n"; } bless(sub {}, 'Foo +');} # no d
-- gam3
A picture is worth a thousand words, but takes 200K.
A picture is worth a thousand words, but takes 200K.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: No DESTROY object.
by ambrus (Abbot) on Jan 22, 2010 at 13:31 UTC | |
by JavaFan (Canon) on Jan 22, 2010 at 14:36 UTC | |
by WizardOfUz (Friar) on Jan 22, 2010 at 14:29 UTC | |
by gam3 (Curate) on Jan 22, 2010 at 17:15 UTC | |
by ambrus (Abbot) on Jan 22, 2010 at 17:22 UTC | |
Re: No DESTROY object.
by WizardOfUz (Friar) on Jan 22, 2010 at 14:52 UTC | |
by gam3 (Curate) on Jan 22, 2010 at 16:16 UTC | |
by WizardOfUz (Friar) on Jan 22, 2010 at 17:20 UTC | |
by gam3 (Curate) on Jan 23, 2010 at 10:35 UTC |
Back to
Seekers of Perl Wisdom