Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: How to add a file to @INC path in perl

by DrHyde (Prior)
on Aug 31, 2011 at 10:03 UTC ( #923390=note: print w/ replies, xml ) Need Help??


in reply to Re^3: How to add a file to @INC path in perl
in thread How to add a file to @INC path in perl

I change @INC at run-time all the time.

What you're probably confused about is that 'use Some::Module' normally happens at compile-time (actually it happens in a virtual BEGIN block) and that is how most people interact with @INC. However, you can defer useing modules by doing it in a string-eval, or you can use require, or do.

And there are all kinds of evil tricks you can play by putting code-refs into @INC.


Comment on Re^4: How to add a file to @INC path in perl
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2015-07-03 23:46 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 (57 votes), past polls