use Parent; use strict; use warnings; my $parent = new Parent( 'value1', 'value2' ); my $child = $parent->getChild(); print "Values 1 and two from the child are:\n1....", $child->getValue1(),"\n2....", $child->getValue2(),"\n"; print "Values 1 and two from the child via the parent are:\n1....", $parent->getChildValue1(),"\n2....", $parent->getChildValue2(),"\n";