|No such thing as a small change|
Source filters in eval/requireby liz (Monsignor)
|on Oct 02, 2003 at 21:12 UTC||Need Help??|
liz has asked for the
wisdom of the Perl Monks concerning the following question:
Executive Summary: how can I get a source filter applied to required or evalled source code?
This came up while investigating some more features of load, when I suddenly realised that source filters have problems with AUTOLOADer modules, such as AutoLoader and SelfLoader (and of course load.pm). The problem basically is that they're not applied to require'd or eval'ed source. For example, take this module which basically uppercases any strings between double quotes:
This module is called in a script called "bar":
and the external file "bar2":
and alas, the output is always:
HELLO WORLD Just Another Perl Hackerwhereas you would hope and/or expect:
HELLO WORLD JUST ANOTHER PERL HACKER
These nodes seem related to this subject, but refer to other aspects of this problem I think.
I've been thinking a lot about this, but I guess I'm missing the right inspiration. I hope someone in the Monastery will have the right inspiration to fix this problem so I can add more features to load.pm.