use strict; sub Foo::bar { print 'called on line ', (caller)[2], ": $_[0]\n" and $_[0]; } my $frobozz = bless \&Foo::bar, 'Foo'; $frobozz->bar('eenie'); $frobozz->bar('eenie')->('meenie'); $frobozz->('eenie'); Foo->bar('eenie'); Foo->bar('eenie')->bar('meenie'); Foo::bar('eenie'); 'Foo'->bar('eenie'); 'Foo::bar'->('eenie'); "Foo'bar"->('eenie'); # Perl trivia # bar('eenie'); # bombs! require Exporter; @Foo::ISA = ('Exporter'); @Foo::EXPORT_OK = ('bar'); Foo->import('bar'); bar('eenie'); __END__