foo(sub {package other; hello()}); # Always calls other::hello #### sub foo {package other; $_[0]->()} foo(sub {no strict 'refs'; &{(caller)[0] . "::hello"}()}); # Always call hello in callers namespace.