use strict; use warnings; package Foo; # doesn't have a new(), i'm just going to bless # stuff in manually sub bark { print "i'm in foo, and i can bark. woof!\n"; } package Bar; use Data::Dumper; sub bark { my $self = shift; print "here's what my self object looks like:". Dumper($self); print "and I can also say woof. Woof!\n"; } package Baz; our @ISA=qw/Bar/; package main; my $bob = bless [], 'Bar'; $bob->bark; my $sally = bless {}, 'Foo'; $sally->bark; my $charles = bless {some=>'totally', random=>'hash'}, 'Baz'; $charles->bark;