Ok, it looks like I'll have to read up on how an @INC handler works (suggestions are welcome).
In the meantime, as per your test, I put 'use ifdef;' at the top of the module, and the vars I pass on the commandline now propagate. Just to make sure I understand the significance of this, let me see if I've got this right:
- -Mifdef=DEBUGGING on the commandline puts a handler into @INC
- use lib './perl5lib'; in foo.pl puts perl5lib into @INC
- use ifdef; in Bar.pm puts another handler into @INC
The last handler (added in step 3) can now get triggered because it is at the front of @INC. It also knows about perl5lib because it was added in step 2 before the triggered handler. It is also able to process the pod sections tagged with DEBUGGING because it was set in the original handler in step 1.
Am I even close? All this playing with @INC is pretty new to me, so forgive my ignorance.
Thanks!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.