What about -F, --modfilter=FILTER[=REGEX] ?

from pp

-f, --filter=FILTER

Filter source script(s) with a PAR::Filter subclass. You may specify multiple such filters.

If you wish to hide the source code from casual prying, this will do:

% pp -f Bleach source.pl

If you are more serious about hiding your source code, you should have a look at Steve Hay'sPAR::Filter::Crypto module. Make sure you understand the Filter::Crypto caveats!

...

-F, --modfilter=FILTER[=REGEX]

Filter included perl module(s) with a PAR::Filter subclass. You may specify multiple such filters.

By default, the PodStrip filter is applied. In case that causes trouble, you can turn this off by setting the environment variable PAR_VERBATIM to 1.

Since PAR 0.958, you can use an optional regular expression (REGEX above) to select the files in the archive which should be filtered. Example:

pp -o foo.exe -F Bleach=warnings\.pm$ foo.pl

This creates a binary executable foo.exe from foo.pl packaging all files as usual except for files ending inwarnings.pm which are filtered with PAR::Filter::Bleach

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery


In reply to Re: pp bleach main script and modules by LanX
in thread pp bleach main script and modules by Anonymous Monk

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.