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....


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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.