use strict; use warnings; use Foo; my $c = Foo->new(); $c->foo(); $c->bar(); __OUTPUT__ Foo called Bar called Foo called