Does perl have something like ifdef in C?
My coding partner and I, working in two different environments, have been struggling with Log::Log4perl. It works fine in my sandbox. But his machine, and the initial deployment environment for this script doesn't seem to support it. He installed the module, but apparently some sort of persistance issue we've been unable to track down throws compile time errors about "redefining" the logger.
So we want to wrap our logging statements into conditionals to address this issue and make our code work in both environments.
Can anyone here advise how we might do that, please?
Thanks,
-- Hugh
P.S. The C reference was his. I personally know almost nothing of the language.
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.