Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Messing with %INC.

by Theodore (Scribe)
on Apr 24, 2014 at 13:39 UTC ( #1083593=note: print w/ replies, xml ) Need Help??


in reply to Re: Messing with %INC.
in thread Messing with %INC.

Indeed, using do should be lighter and 1 line of code shorter.

my $code = "require '$fn'"; eval $code;
can be replaced by:
do $fn;
Thanks!


Comment on Re^2: Messing with %INC.
Select or Download Code
Re^3: Messing with %INC.
by Anonymous Monk on Apr 24, 2014 at 13:44 UTC

    More than that: do re-evals the file each time it is called, so your manipulation of %INC is not necessary.

      Yes, you are right. That's what i was looking for. So, never mess with %INC still holds as a good advice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-12-21 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls