Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

TinyPerl for Win32

by gmpassos (Priest)
on Dec 27, 2002 at 04:25 UTC ( #222465=CUFP: print w/replies, xml ) Need Help??

Well, this is a "Cool way to use Perl".

I made a Perl 5.8.0 version with only the basic things and socket, called TinyPerl (850Kb).

I used some special things to make it small. I have used UPX in the binarys to compress them, and the library (./lib directory) stay inside a file. I made the module LibZip, that I will publish after more tests, to use the like a directory, and it works with XS too.

This is cool for OS like Win32, since it doesn't come with Perl, and you don't need to donwload 10Mb and install every thing if you only want the basics of Perl.

If you want you can create your own file. Just get a normal Lib, cut what you don't need and compress it with ZIP!

Enjoy! ;-P

PS: I will publish in some days the 1.1 version, smaller, but with the same things! (640Kb)

PS.2: Now TinyPerl 1.1 is out! ;-P
see node: TinyPerl 1.1 released

Graciliano M. P.
"The creativity is the expression of the liberty".

Replies are listed 'Best First'.
Re: TinyPerl for Win32
by RMGir (Prior) on Dec 27, 2002 at 13:43 UTC
    Very VERY nice.

    You didn't point out the main advantage of this. You've just created perl on a floppy!!

    This is going to go straight into my emergency floppy set...

      Yes! I didn't think about this! Perl on a floppy! And is the last version of Perl! ;-P

      Thanks for the feedback!

      Graciliano M. P.
      "The creativity is the expression of the liberty".

Re: TinyPerl for Win32
by Ctrl-z (Friar) on Dec 27, 2002 at 19:10 UTC
    great job! why isn't Perl "proper" distributed like this, on all platforms?

    cheers anyway
      Because it's not very good for developers! This version is better to release your applications, for a module developer you will need the opened! But TinyPerl can work with both ways in the same time! ;-P

      Graciliano M. P.
      "The creativity is the expression of the liberty".

Re: TinyPerl for Win32
by batkins (Chaplain) on Dec 28, 2002 at 20:27 UTC
    VERY nice. Have you considered using Nullsoft's NSIS installer system (freeware) to create a Tinyperl installer? Good work!
      Yes, I know this tool, is very good! Perhaps in the next release I publish it with a installer! ;-p

      For the 2.0 version I want to test more LibZip, maybe cut off the small ./lib directory using some Perl magics. And I will enable the end user to append their script in the executable, to delivery their applications using TinyPerl, since I already do that (take a look in the end of the file tinyperl.exe).

      Graciliano M. P.
      "The creativity is the expression of the liberty".

        Also, if you use NSIS and its built-in compression, you can probably distribute the lib/ directory as a set of files instead of a zip. This will save loading time for modules, allow easier installation of modules, and will obviate LibZip (and the 111K it uses when uncompressed). Also, the tinyperl you're shipping doesn't seem to be UPX'd. Your version is 16KB; the UPX'd version is 3.5KB. Finally, UPX'ing all the files in the auto directory of will save you a good amount of space. Good luck! Bill
Re: TinyPerl for Win32
by elwarren (Priest) on Dec 29, 2002 at 22:52 UTC
    With this being so small, maybe we could use it as an alternative to perl2exe? Throw in the recent .par distribution method and we may finally be able to distribute perl applications...

    Any performance gain/loss with UPX?
      Take a look in the PerlBin project at sourceforge:

      PodMaster and I are working on that, and TinyPerl use the same idea, well, it was the first to use this. TinyPerl has a small script inside it that loads LibZip before run your file.

      About UPX I don't see any difference in the performance, they made a very good algorithm for binary compression, and it's very fast!

      Graciliano M. P.
      "The creativity is the expression of the liberty".

        Is there any further development on TinyPerl? Is source code available? I want to modify it for my needs... Thanks for the great tool! :)
Re: TinyPerl for Win32
by mt2k (Hermit) on Dec 28, 2002 at 21:52 UTC
    Mmm... would you be able to further explain what you mean by "the basic things"? Seems cool to me that such a small version exists, and I'll have to try it out sometime. /me likes the idea of running perl from a floppy. :)

    eval reverse@{[lreP
    =>q{ tsuJ\{qq},' rehtonA'
    ,q{\}rekcaH },' tnirp']}[1+1+
Re: TinyPerl for Win32
by shawndream (Initiate) on Oct 31, 2014 at 15:06 UTC
    FYI - after far too many hours of trying to get windows to package a simple perl script with a polydactly handful of packagers and distros, I found tinyperl to still be a lifesaver. It was perfect. If that libzip thing actually works, it would probably be ideal for lots of folks, datedness be damned.

      That's a pretty old package, I'm curious what packagers did you try and what failed?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://222465]
Approved by rob_au
Front-paged by gmax
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2022-10-01 17:29 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (3 votes). Check out past polls.