develooper Front page | perl.beginners | Postings from January 2002

Perl2Exe (or Compiled Perl) and Shipping Runnable Source

Morbus Iff
January 7, 2002 11:10
Perl2Exe (or Compiled Perl) and Shipping Runnable Source
Message ID:
Hey all,

To summarize, my impresssion of people's hatred of Perl2Exe
or generically, compiled ("hidden source") perl is:

  - it hides the source from the user. this goes against Perl,
    and you really should be using another language if you want
    to be such a Nazi.

I totally agree with this. Now, the caveat: *I* ship compiled Perl 
applications, primarily AmphetaDesk [1], which is available for Mac and PC. 
My primary reason of shipping compiled is:

  - it saves the user from having to download a large Perl
    installation, and learning how to interact with Perl
    and CPAN. I cater to the lowest common denominator in
    *everything* I do. If it's not easy, then I won't ship
    it - this extends OUTSIDE of Perl - if the download
    is to long, or the install process isn't easy, then
    those are problems too.

So, I started thinking of how to merge both of those two ideals. My initial 
thought, and why I'm writing this email, is use / require / do. The idea is 
to write a wrapper exe that simply loads in, at runtime, the pure perl 
code. Roughly:

    - all real source code under "/src/"
    - a script under "/" that contains all
      module declarations, path determinations, etc,
      that contains, simple "do /src/" or
      "use src/mainscript.lib", etc.

This would then be turned into the wrapper.exe that is created 
from runtime builders like perl2exe or MacPerl. The wrapper.exe would 
contain all the CPAN modules, all other modules used, and any XS libraries 
needed. The actual application source code would be shipped as plain text. 
In this case, we satisfy the first requirement:

  - the perl interpreter, all modules, and XS libraries are contained
    in one binaried app, which prevents the need for additional
    downloading and installation.

It also satisfies the second requirement:

  - all source code for the app is shipped plain text, in /src/.

Now, the inevitable questions:

  - how do the naysayers and the users feel about this?
  - what do you see can break about this implementation?

Once I get more time, I'll be trying this approach on my own AmphetaDesk.


Morbus Iff ( softcore vulcan pr0n rulezzzzz ) &&
please me:
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / morbus Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About