when you compile a script with pp ...

pp does not compile perl code. It wraps (hopefully) all required modules, the main script, and the perl interpreter into a single binary. Think of it as a self-extracting archive that automatically starts the main script after unpacking, using the embedded perl interpreter.

... is it decompilable?

Yes. See Uncool Use Of Perl: perl2exe. decompile quick steps, Re: Protection for Perl Scripts, Re^2: best way to store login information for a perl script?, Re^2: Where should I have configuration information in a file or database. Last but not least, pp clearly documents that it uses PAR as its archive format, which is a renamed, unprotected ZIP file.

(And if it is not is it platform-independent?)

No. Compiled binaries are never platform-independent. Typically, it works only on the same platform. Some platforms have ways to execute code written for older platforms (e.g. most Linux x64 systems can run Linux x86 executables, same for Win16 on Win32 and Win32 on Win64, MacOS classic apps on PowerPC MacOS X versions) or for other platform (FreeBSD can emulate the Linux API, Linux can run some Windows executables using wine). But you can't expect any compiled binary to run on any platform.

Also pp compiled perl seems to have an overhead. Is it a one time only overhead or does it get bigger the more code you have?

Since pp must contain all required code, the final executable grows bigger and unpacking takes more time.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re: Escape characters and arrow keys and pp by afoken
in thread Escape characters and arrow keys and pp by 7cardcha

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.