$self->{Person} = \shift; in Updater->new should be $self->{Person} = shift;. The Person object is already a reference. Given that change the following code:
package main; my $him = Person->new ('Bob wibble'); my $ud = Updater->new ($him); $ud->updateName (); print $ud->{NAME};
prints:
Bob wibble
In reply to Re: Aggregation problem
by GrandFather
in thread Aggregation problem
by pankajisgarg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |