in reply to How do I make one package use a module from another package?

If I understand this right, you want to export unsolicited names into the caller's namespace. The code below(untested) should work:
#Caller program use GIVEMEJUNK;
The GIVEMEJUNK module can be written as:
package GIVEMEJUNK; my @importfrom = qw(DBI Acme::Code::Police ...); # List of modules you want to get stuff from. foreach(@importfrom){ use $_; #Export everything we get from each module push @EXPORT, $_::@EXPORT; } 1;

Replies are listed 'Best First'.
Re: Re: How do I make one package use a module from another package?
by bobn (Chaplain) on Jul 22, 2003 at 13:14 UTC

    It can be written that way. It doesn't work, however, at least not in 5.8.0. on linux. -- for no disclaimer.

    Update: Ooops, it did say "(untested)".

    --Bob Niederman, http://bob-n.com