package Foo; use strict; use warnings; sub Hello_World { print "Hello Word\n"; } my $callback = sub { Hello_World(); }; sub Bar { $callback->(); print "This is the actual 'would be' exported sub\n"; } 1; # Some script that uses it #!/usr/bin/perl use strict; use warnings; use Foo; Foo::Bar();