force recursive source filtering

Discussion in 'Perl' started by Andrew Schulman, Dec 24, 2008.

  1. I want to apply a source filter, via say Filter::Simple, not just to a
    particular source file, but to all of the source files that it may do, require,
    or use. E.g., if I've built a source filter in mySourceFilter, then in

    use mySourceFilter;
    use custommodule;
    print ...

    the code that resides in the above source file will be filtered, but the code
    that it reads in from custommodule.pm will not. This is what
    http://perldoc.perl.org/perlfilter.html says, and my observation confirms it.

    What I want is to modify the do, require, and use statements to automatically
    apply mySourceFilter to every file they load. But I don't know how.

    Anyone done this? Suggestions?
    Thanks,
    Andrew.
     
    Andrew Schulman, Dec 24, 2008
    #1
    1. Advertisements

  2. The newsgroup comp.lang.perl is defunct. Try comp.lang.perl.misc.

    Thank you.
    Andrew.
     
    Andrew Schulman, Jan 1, 2009
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.