|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re^3: Directory Structureby armstd (Friar) |
| on Aug 27, 2011 at 15:19 UTC ( #922827=note: print w/ replies, xml ) | Need Help?? |
|
Your 'package' name doesn't match your 'use', first of all.
should be
or
In either case, you should either execute your script from within the parent directory of the first level of the package name, or have that directory in @INC (via -I, 'use lib', etc). The parent directory of "eg", or the parent directory of "package1" (myfolder), depending on the name you choose. 'print @INC' isn't helping because your script fails to compile, but Perl prints @INC helpfully in your compilation error anyway. Writing Modules has a similar issue, with good references to go read on this topic and other issues you'll run into fairly quickly once you get past this one. --Dave
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||