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.
In reply to Re^4: How to add a file to @INC path in perl
by DrHyde
in thread How to add a file to @INC path in perl
by sarvan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |