package Foo; require Bar; sub import { my $class = shift; # first param is class name if (@_) { Bar->import(shift); # that's passed along # with 'use Foo qw(x);' } } # more stuff... 1; #### package Bar; sub import { my $class = shift; if (@_) { my $x = shift; # passed from Foo warn "$class: got '$x' from ".caller()."\n"; # now do whatever you like with 'x' } } # more stuff... 1; #### #!/usr/bin/perl use Foo qw(blorf); #### $ perl -MFoo=blorflydick -e 1 Bar: got 'blorflydick' from Foo