[Wellington-pm] Creating an array of objects
grant at mclean.net.nz
Sat Mar 11 13:04:08 PST 2006
On Sat, 2006-03-11 at 23:02 +1300, Grant McLean wrote:
> On Sat, 2006-03-11 at 21:58 +1300, Cliff Pratt wrote:
> > my $foo = MyPackage->new('bar') ;
> > Is $foo an object or an object reference?
> the distinction is seldom important
Actually just to contradict myself ...
It is important to realise that if you assign $foo to $bar, then you end
up with two references to the same object. Change a property on one and
you'll see it's changed on the other as well.
More information about the Wellington-pm