Stuff
public text v1 · immutablepackage Parent;
our $thing;
sub new {
my ($class) = @_;
my $self = { };
return bless($self, $class);
}
sub thing {
my ($self, $x) = @_;
if ($x) {
$thing = $x;
}
return $x;
}
---------------------------------------------
package Child;
use base 'Parent';
-----------------------------------------
script
use Child;
my $obj = Child->new();
$obj->thing('bovine juice');
print $obj->thing, "\n";