Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Directory Structure

by armstd (Friar)
on Aug 27, 2011 at 15:19 UTC ( #922827=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Directory Structure
in thread Directory Structure

Your 'package' name doesn't match your 'use', first of all.

use eg::myfolder::package1; package package1;

should be

use eg::myfolder::package1; package eg::myfolder::package1;

or

use package1; package package1;

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


Comment on Re^3: Directory Structure
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://922827]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-09-20 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls