Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

How to import names from a dynamically required module

by jds17 (Pilgrim)
on Oct 02, 2012 at 21:39 UTC ( #996924=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $package_name = get_package_name();
    
    eval "require $package_name";
    eval "$package_name->import(
            qw( method1 method2 method3 )";
    
  2. or download this
    Undefined subroutine &MyPackage::num_records called at ...
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://996924]
Approved by tobyink
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2015-05-04 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (93 votes), past polls