http://www.perlmonks.org?node_id=850248

clueless newbie has asked for the wisdom of the Perl Monks concerning the following question:

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?