Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: require & import $module_name

by chromatic (Archbishop)
on Jul 19, 2012 at 20:53 UTC ( #982716=note: print w/ replies, xml ) Need Help??


in reply to Re: require & import $module_name
in thread require & import $module_name

I needed to use a named lexical there. Not really sure why that is.

Without seeing the other code, it's hard to say for sure, but it's possible that something else modifies $_ without localizing it appropriately.

As well as the function call format that you wrote it in.

Like I said, be very careful with your approach to calling import. I know what the documentation says about use, but I patched it before 5.16 so it was closer to reality. You're asking for trouble if you do it that way.


Comment on Re^2: require & import $module_name
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2015-07-05 14:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls