#file: Foo.pm package Foo; *do_something = &make_do_something( 'foo' ); sub make_do_something { my $name = shift; ## In my real code, I have other interesting params here ## that gives my sub the information to do the ## things that each class knows about. return sub { my $self = shift; if ( $name ne 'foo' ) { print "Not foo\n"; $self->SUPER::do_something(); } print "Foo $name!!!\n"; return 1; } } __END__ #File: Bar.pm package Bar; use base 'Foo'; *do_something = &Foo::make_do_something( 'bar' ); sub new { bless {}, shift(); } __END__ #!/usr/local/bin/perl #File: foobar.pl use Foo; use Bar; $b = new Bar(); $b->do_something(); __END__