Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How to import names from a dynamically required module

by kejohm (Hermit)
on Oct 02, 2012 at 22:21 UTC ( #996927=note: print w/ replies, xml ) Need Help??


in reply to How to import names from a dynamically required module

There is a syntax error in your second eval; you are missing a ), so the code isn't being executed. After evaling code you should either check the value of the $@ variable, or check the return value from eval, like tobyink's example above.


Comment on Re: How to import names from a dynamically required module
Select or Download Code
Replies are listed 'Best First'.
Re^2: How to import names from a dynamically required module
by jds17 (Pilgrim) on Oct 02, 2012 at 23:06 UTC
    Thanks, kejohm. You are right, that was a stupid error on my side. I like the version without the eval as in tobyink's example better in any case.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2016-02-14 18:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (470 votes), past polls