#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    334
    Rep Power
    246

    Subs exporter not working


    Hi,

    Can someone please advise why this isn't exporting the desired subs...

    Code:
    package Utils;
    
    # Invoke Exporter
    use Exporter;
    
    # Set Variables
    our @ISA = qw(Exporter);
    
    our %EXPORT_TAGS = ( 
        
        'SMTP' => [ qw(SMTP_DOMAIN) ],
        
        'RAG' => [ qw(RAG_RATING RAG_COLORS) ], 
        
        'INPUT' => [ qw(cleanInput buildUPD buildADD) ],   
        
    );
    
    our @EXPORT = qw( ISDate UKDate setSPArgs );
    
    our @EXPORT_OK = ( @{ $EXPORT_TAGS{'SMTP'} }, @{ $EXPORT_TAGS{'RAG'} }, @{ $EXPORT_TAGS{'INPUT'} } );
    
    sub import {
        push(@_, qw/ ISDate UKDate setSPArgs /); 
        goto &Exporter::import;
    }
    If I then try to use the module
    Code:
    use Utils qw(INPUT);
    I get an error saying 'Input' is not exported by the Utils module?

    Thanks,
    1DMF
    Free MP3 Dance Music Downloads

    To err is human; To really balls things up you need Microsoft!
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    334
    Rep Power
    246
    OK, my bad, missed out the colon!

    Code:
    use Utils qw(:INPUT);
    Free MP3 Dance Music Downloads

    To err is human; To really balls things up you need Microsoft!

IMN logo majestic logo threadwatch logo seochat tools logo