Greetings,

I have a module (let's just call it Snitch) whose task is to catch, store and report that which goes to STDERR - along with the context and the source. It does this via tie (and Tie::StdHandle). Using Filter::Simple (and a FILTER block) I have integrated a very rudimentary form of Smart::Comment into Snitch to convert the comments of the form "### ..." into their code equivalent - namely:

### assert: boolean expression unless (boolean expression) { die the boolean expression is false +with a dump of the elements in the expression } ### verify: boolean expression unless (boolean expression) { warn the boolean expression is false + with a dump of the elements in the expression } ### dump: list if (DEBUG) { warn with a dump of the elements in the list } ### evaluate: expression if (DEBUG) { warn value of expression = expression } ### "string" if (DEBUG) { warn "string" } ### <Perl code> <Perl code>

By pushing a reference to a sub onto @INC Snitch "auto wires" any modules that it finds in the specified "private library".

Under Window 2k/Perl 5.10 all this works perfectly well from either the command line or xampp. On my work *nix devbox, it all works from the command line (perl 5.8.6). Under (devbox) Apache & mod_perl, there are no problems with the STDERR handling portion (I get the STDERR output along with the message context and the source), but the conversion from comment to code never occurs (neither in the user nor the wireable modules). (I should note that (devbox, Apache & mod_perl) while a "use Smart::Comments" causes no error, it too fails to convert its smart comments to code.) I did confirm that the commandline version and the Apache & mod_perl version are using the same modules.

Where's the sin and how do I atone for it?


In reply to Filtering failing under Apache & mod_perl? by clueless newbie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.