package MyMod1; use Exporter::Extensible -exporter_setup => 1; sub foo :Export( :default ) { 42 }
package MyMod2; use Exporter::Extensible -exporter_setup => 1; sub bar :Export( :default ) { 43 }
package MyMod3; use parent qw( MyMod1 MyMod2 );
However, I also recommend that you don't export things by default. It isn't much more to type use MyMod3 ':all'; and then it gives you more flexibility in the future to choose fewer imports.perl -I. -MMyMod3 -E 'say foo'
package MyMod1; use Exporter::Extensible -exporter_setup => 1; sub foo :Export { 42 }
package MyMod2; use Exporter::Extensible -exporter_setup => 1; sub bar :Export { 43 }
package MyMod3; use parent qw( MyMod1 MyMod2 );
perl -I. -MMyMod3=:all -E 'say foo'
In reply to Re: One module to use them all (proxy moudle that exports subs of other modules)
by NERDVANA
in thread One module to use them all (proxy moudle that exports subs of other modules)
by nataraj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |