note
DrHyde
<p>I change <code>@INC</code> at run-time all the time.
<p>What you're probably confused about is that '<code>use Some::Module</code>' normally happens at compile-time (actually it happens in a virtual <code>BEGIN</code> block) and that is how most people interact with <code>@INC</code>. However, you can defer <code>use</code>ing modules by doing it in a string-<code>eval</code>, or you can use <code>require</code>, or <code>do</code>.
<p>And there are all kinds of evil tricks you can play by putting code-refs into @INC.
923351
923371