|Don't ask to ask, just ask|
How to use a .pm file in a .pl file in another directory.by tommyxd (Acolyte)
|on Jan 29, 2012 at 16:21 UTC||Need Help??|
tommyxd has asked for the
wisdom of the Perl Monks concerning the following question:
I'm currently working on a Perl chess project and I have all my modules in separate .pm files. My directory tree is looking like this:
I'm currently trying to write some tests, and I can't seem to be able to access any of the .pm files in the Chess/ or Chess/Piece directories. I kept getting the error: "Can't locate *.pm in @INC (@INC contains: ...)", so I tried adding my working directory to @INC with a code like this:
This got me nowhere, so I tried this as an alternative:
This didn't work either..
So, PerlMonks, can you help me out? How can I write the following code with my directory structure being as it is?
I'm using Windows and ActiveState Perl.
Any help will be greatly appreciated!