sub new { my $ERA; my $Strikeouts; bless { get_ERA => sub { $ERA }, set_ERA => sub { $ERA = shift }, get_Strikeouts => sub { $Strikeouts }, set_Strikeouts => sub { $Strikeouts = shift }, }, shift(); } sub AUTOLOAD { (my $method) = $AUTOLOAD =~ m/::(.*)$/; return if $method eq 'DESTROY'; our $this = shift; if(! exists $this->{$method}) { my $super = "SUPER::$method"; return $this->$super(@_); } $this->{$method}->(@_); } 1;