in reply to Where is blessing magic located?
You don't bless a hash, you bless a reference. Always. (For the purpose of argument, let's not consider tie here.) The hash is not the object. The (blessed) reference is.
my $scalar = 1; my $scalar_reference = \$scalar; my $object = bless $scalar_reference, 'class_name'; $scalar = 2; print "Yep, still an object!\n" if UNIVERSAL::isa( $object, 'class_name' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Where is blessing magic located?
by John M. Dlugosz (Monsignor) on Nov 06, 2002 at 16:19 UTC | |
by chromatic (Archbishop) on Nov 06, 2002 at 17:38 UTC | |
by John M. Dlugosz (Monsignor) on Nov 06, 2002 at 19:00 UTC |