package Import; sub import { shift; # I don't care about my package. my $to_call = shift; my $call_from = caller; eval qq( package $call_from; # So the import goes into the right package. $to_call\->import(\@_); ); } 1; #### package Foo; BEGIN { use base Exporter; @EXPORT = "HELLO"; @EXPORT_OK = "BYE"; } use constant HELLO => "Hello, world\n"; use constant BYE => "Goodbye, cruel world\n"; package Bar; use Import "Foo"; print HELLO; package Baz; use Import qw(Foo BYE); print BYE;