http://qs1969.pair.com?node_id=1149049

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

Hello PerlMonks, I am using

in a 'Windows 7 (32bit)', 'Strawberry 5.22.0.1' environment.

The task: pp should produce an encrypted executable 'foo.exe' from multiple source files using the following command:

pp -f Crypto -M Filter::Crypto::Decrypt -o foo.exe fool.pl
'foo.pl' includes other files (foo1.pl, foo2.pl) via 'do'-statements.

foo.exe as an interactive program is being build and executed without any problems. However, during execution I had a closer look at the temporary runtime directory structure. I found, that 'foo.pl' is encrypted whereby the other '.pl'-files (foo1.pl and foo2.pl) are not encrypted at all.

Could you please advise, what to do to have all '.pl'-files encrypted.

Thank you very much for your help - Jo

Replies are listed 'Best First'.
Re: Included scripts did not encrypt using pp
by GotToBTru (Prior) on Dec 01, 2015 at 17:30 UTC

    What in the documentation led you to expect the other programs would be encrypted? Why would you want them to be ?

    Dum Spiro Spero
Re: Included scripts did not encrypt using pp (libs aren't scripts)
by Anonymous Monk on Dec 01, 2015 at 23:20 UTC

    :) Scripts are files you list like pp ... foo.pl bar.pl baz.pl they end up in parfoo.exe/inc/script and they are crypto encrypted

    If you just use pp... foo.pl only foo.pl is encrypted , the others end up in parfoo.exe/inc/lib/ and they are not encrypted

      This is exactly what I expected - but having more than 1 script specified like
      pp .... foo.pl foo1.pl foo2.pl
      pp will try to generate multiple executables and will fail.

      I was under the impression that the '-f'-option will decrypt ALL scripts automatically. Maybe I did not understand the pp-syntax in full detail and I overlooked something.

      Thanks - Jo
        Let me add one remark:

        All additional pl-files (foo1.pl and foo2.pl) are subroutines from other applications. That's why there are separate files.