in reply to Re: When CGI->new doesn't return a CGI object
in thread When CGI->new doesn't return a CGI object

While we are being niggly and pedantic i'd like to correct you where you said

Then $x and $y are different references that refer to the same array, which has been blessed into the Bar package.

This is a common misunderstanding (even by the serious pros. Data::Dumper has a flaw that IMO can be traced back to this subtle mistake) In reality you should have said

Then $x and $y are different scalar variables holding a reference to the same array, which has been blessed into the Bar package.

This is a crucial distinction. Consider how many distinct variables are present in the two following snippets:

my ($z,$x,$y); $x=\$y; $y=\$x; $z=[$x,$y];
and
my $z=[]; $z->[0]=\$z->[1]; $z->[1]=\$z->[0];
Note that dumping $z in both cases will result in the same output when using Data::Dumper.

Pedantic can be fun and useful sometimes... :-)

Oh yes, the correct answer to my question can be found in the source of the node.

--- demerphq
my friends call me, usually because I'm late....