The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


PAR::Filter - Input filter for PAR


    $code = 'use strict; print "Hello, World!\n";';
    $ref = PAR::Filter->new('PodStrip', 'Bleach')->apply(\$code);
    print $code;    # pod-stripped and obfuscated code
    print $$ref;    # same thing

    $ref = PAR::Filter->new('PodStrip', 'Bleach')->apply('');
    print $$ref;    # same thing, applied to


Starting with PAR 0.76, pp -f takes a filter name, like Bleach, and invokes this module to transform the programs with PAR::Filter::Bleach. Similarly, pp -F Bleach applies the Bleach filter to all included modules.

It is possible to pass in multiple such filters, which are applied in turn.

The output of each such filter is expected be semantically equivalent to the input, although possibly obfuscated.

The default list of filters include:


Audrey Tang <>


Copyright 2003-2009 by Audrey Tang <>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.