in reply to Re: Re: Where is blessing magic located?
in thread Where is blessing magic located?
You said it yourself -- it's the same object. Try this:
my %hash; my $x = \%hash; my $y = \%hash; print "($x) [$y]\n";
The blessing isn't associated with the value; it's attached to the container. bless adds or changes that through a reference. Since you have two references to the same thing, and since you can only have one blessing per container, you're seeing the expected and designed behavior.
If you want two different objects, you need two different containers.
(I'm using the word container to differentiate between a variable and its value.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Where is blessing magic located?
by John M. Dlugosz (Monsignor) on Nov 06, 2002 at 19:00 UTC |