kmullin has asked for the wisdom of the Perl Monks concerning the following question:
I'm just trying to confirm something that I think is true. I have a 'use' statement in my perl code to bring in a perl module. Perl goes to the @INC array to get a directory list, and searches each directory in turn to find the perl module I specify in my use statement, right? Anything special about the file that it matches by name (permissions, or something? - yes, it must be readable, I assume, anything else?)
BUT WAIT! if my use statement looks like:
use Amazon::DistributionCenter::Setup;the 'Amazon' and 'DistributionCenter' are actually directories, so its really looking for Amazon/DistributionCenter/Setup, right? So if I really want to 'fool' it to using mine, I have to add a directory to the PATH, and under that directory, I have to have Amazon/DistributionCenter, right?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: USE statement, search method
by Fletch (Bishop) on Dec 07, 2007 at 22:10 UTC | |
|
Re: USE statement, search method
by toolic (Bishop) on Dec 07, 2007 at 22:30 UTC | |
|
Re: USE statement, search method
by Erez (Priest) on Dec 07, 2007 at 23:07 UTC | |
by kmullin (Acolyte) on Dec 07, 2007 at 23:20 UTC | |
by chromatic (Archbishop) on Dec 08, 2007 at 06:22 UTC | |
by kmullin (Acolyte) on Dec 13, 2007 at 16:37 UTC | |
by chromatic (Archbishop) on Dec 13, 2007 at 19:11 UTC |