Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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?
[choroba]: I returned to Rosalind after a year, and solved another 5 problems in the last week

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-02-27 17:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (390 votes). Check out past polls.