News
About TinyPerl
Architecture
 


TinyPerl use a set of "magics" to make it compact. All the binarys (dll,so,exe) are compressed with UPX and the Lib (./lib directory) stay compressed inside a lib.zip file. To use the lib.zip file the module LibZip was used. The advantage of the LibZip compared to other similar modules, like PAR, is the independence and size. The files of LibZip stay appended inside the executable and the XS of Compress::Zlib, needed to uncompress the files, was compiled statically inside PerlLib (Perl58.dll), avoiding extra files.


Features
 


Features:

  • Modules:
    It comes only with the basics to run, this means: Carp, Dynaloader, Exporter, IO, PerlIO, Socket, strict, utf8, vars, warnings, XSloader... (see inside lib.zip)

  • XS:
    Enabled from version 1.1 of LibZip. When a module that uses XS files are loaded all the content of lib.zip/lib/auto/FOO is extracted to ./libzip-tmp directory.

  • lib.zip and ./lib
    You can use the both ways, lib.zip file and ./lib directory, in the same time.

  • libzip-tmp
    This is the directory where temporary files of LibZip are extracted. When TinyPerl goes out it cleans the directory (except files that are used in the moment). If 2 TinyPerl are running in the same time they will share the extracted files, saving load time.

Generating Binarys
 


Well, TinyPerl is small and malleable, making a good tool for publishing. From the version 2.0 TinyPerl can get your script.pl and turn it into a binary (script.exe). To do that type:

     $> tinyperl -bin script.pl script.exe

You can create non console executables too, just use the option -g

     $> tinyperl -bin -g script.pl script.exe

You can create your own lib.zip file, just get a normal ./lib directory (from the same version of TinyPerl - 5.8.0), cut off what you don't need, and compress the directory. It will need to have the same path structure of the original lib.zip, with lib/ as root (see inside it).

See the -bin option for more.

No more comments, since the idea is simple, but useful. ;-P

Take a look in the project PerlBin.

Copyright & Licence
 


Copyright (C) 2003 Graciliano M. P. <gm[at]virtuasites.com.br>

This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

Enjoy ;-p
and send your feedback!