package M; use strict; use warnings; BEGIN { our ISA 'Exporter'; our EXPORT_OK qw ( x ); require Exporter; *import = \&Exporter::import; } sub x { my $callback = shift(@_); &$callback; # or &$callback(...); } 1; ^^^ M.pm ^^^ vvv script.pl vvv use strict; use warnings; use M qw( x ); sub _x { print("main::_x(" . join(', ', @_) . ")\n"); } x(\&_x, 'a', 'b'); __END__ outputs ======= main::_x(a, b)