in reply to Passing Module parameters to another module
Maybe something like this (if I'm understanding you correctly):
package Bar; use Exporter 'import'; our @EXPORT_OK = qw(x); sub x { print "x(): @_\n"; } 1;
package Foo; sub import { print "Foo::import(): @_\n"; # debug require Bar; # do whatever you want with the import() args, e.g. shift @_; Bar->import(@_); } 1;
#!/usr/bin/perl use Foo 'x'; # x() will be imported from Bar into Foo namespace # (as would be done when using a hardcoded "use Bar 'x' +" within Foo) Foo::x('bla'); __END__ $ ./824136.pl Foo::import(): Foo x x(): bla
|
|---|