A Module That Exports a Function
package Foo;
# Always export `foo': sub import { # Get name of calling package my $caller = caller;
*{$caller . '::foo'} = \&foo; }