Great thread! Just like to get some clarity on a couple of things.
If the use lib::test is not defined in test.pm and is therefore not found, how is the programme finding and executing test::min()? As SuicideJunkie has stated, this way works, therefore are the directory and subdirs in which the op is operating not already imported to the @INC?
Given, the assumption the op is already within an @INC'd directory, at what point, in the package declaration of lib::test do you 'cut-off' the system path, such that you are not declaring the::whole::path::to::lib::test?
The answers here have shed a lot of light on using modules in different directories which is great, as i am currently getting to grips with similar issues in strawberry perl. Particularly tobyinks' description of the way use functions.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||