Dan Muey <[EMAIL PROTECTED]> wrote:
: 
: I'm wanting to setup a module that will export whatever is in 
: @EXPORT (if anythign) and ':basic'
: 
: IE  I want 
: use Monkey;
: To be identical to 
: use Monkey qw(:basic);

    Seems like you really need is a way to test this
for yourself. Here's a quickie I just wrote. I'm sure
it fails for some modules, but . . .

use strict;
use warnings;
use Data::Dumper;

print Dumper imported( 'CGI', ':html' );

sub imported {
    my( $module, @import ) = @_;
    require "$module.pm";
    my @previous_keys = keys %::;
    import $module @import;

    my %symbol_table = %::;
    delete @symbol_table{ @previous_keys };
    return [ keys %symbol_table ];
}


HTH,

Charles K. Clarkson
-- 
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to