in reply to Re: Re: Breaking a script into smaller files
in thread Breaking a script into smaller files
The point of changing @INC at compile time is to make sure that the new paths are there when modules are loaded. If you don't do that at compile time (with either BEGIN or use lib), it won't affect any of your modules.
Can I say "compile time" enough?
Update: There's no effective difference between use lib and the BEGIN block (with unshift), except that lib adds some architecture-dependent directories, if they exist. I was only addressing the "@INC is global" question. (Short answer: it is, but the important thing is *when* it is changed.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Breaking a script into smaller files
by John M. Dlugosz (Monsignor) on Nov 13, 2001 at 09:18 UTC |