http://www.perlmonks.org?node_id=378946


in reply to Package level scope callbacks.

BrowserUk,
I am likely to be completely off base, but wouldn't a closure do what you wanted? I guess I don't really understand what you mean, but just in case:
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();

Cheers - L~R