This is the README file for PAR, a toolkit to create and use perl scripts and modules stored inside compressed .par files. Please type "perldoc PAR" after installation to see the module usage information, and "perldoc PAR::FAQ" for frequently answered questions. For packing scripts with prerequisite modules into stand-alone scripts or executables (aka PerlApp, Perl2exe, or 'perlcc that works'), see "perldoc pp" and "perldoc tkpp". For running ".par" files directly, see "perldoc parl". To generate/execute self-contained perl scripts, see "perldoc par.pl". An extensive "Cross-Platform Packaging and Deployment with PAR" tutorial is available as "perldoc PAR::Tutorial". A slightly outdated version is also available online at . * Installation PAR uses the standard perl module install process: cpansign -v # optional; see SIGNATURE for details perl Makefile.PL make # or 'nmake' on Win32; see notes below make test make install If your system has a C compiler, or if somebody has built a PAR package for your architecture, the 'pp' tool and a stand-alone binary version of par.pl will be installed, so you can generate self-executable binaries like this: % pp -o foo.exe /home/test.pl * Binary installation with pre-built PAR files This distribution uses the Module::Install framework to offer pre-compiled, architecture-dependent PAR packages to save your compilation time. This process is completely automatic -- no actions are required on your part. However, if nobody has generated such a package for your architecture, you will see a short messages like this: Fetching 'PAR-0.81-i386-freebsd-5.8.0.par' from www.cpan.org... *** No installation package available for your architecture. However, you may wish to generate one with 'make par' and send it to , so other people on the same platform can benefit from it. *** Proceeding with normal installation... If you are on a platform where normal users do not have a C compiler installed (MSWin32, darwin, etc.), please follow the instruction above and mail the generated PAR package (or more preferably, a URL to download that package) to me. Thanks! * Notes for Windows users If you are using Microsoft Windows, you will probably need the 'nmake' utility before installation. It's available at: http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/nmake15.exe If you are connected to the internet, "perl Makefile.PL" is capable of automatically fetch it, and install into your Perl/bin directory. You will see a message like this: The required 'nmake' executable not found, fetching it... However, if you are not yet online, or wish to install 'nmake' into another directory, then please download the file manually, save it to a directory in %PATH (e.g. C:\WINDOWS\COMMAND), then launch the MS-DOS command line shell, "cd" to that directory, and run "nmake15.exe" from there; that will create the 'nmake.exe' file. You may then resume the installation process above, but replace 'make' with 'nmake' in the last three lines. Also, if you do not have the compiler used to compile your version or Perl (e.g. MinGW, GCC on Cygwin, or Microsoft Visual C++ for ActivePerl), and nobody has generated a Windows-specific PAR yet, you will not be able to generate binary executables using 'pp'. Microsoft Visual C++ users: Do not forget to run "vcvars32.bat" (or equivalent) before "perl Makefile.PL"! * Typical Usage Here are some recipes showing how to utilize pp to bundle source.pl with all its dependencies, on target machines with different expected settings: - Stand-alone setup % pp -o packed.exe source.pl # makes packed.exe # Now, deploy 'packed.exe' to target machine... $ packed.exe # run it - Perl interpreter only, without core modules: % pp -B -p source.pl # makes source.par % par.pl -B -Opacked.pl source.par # makes packed.pl # Now, deploy 'packed.pl' to target machine... $ perl packed.pl # run it - Perl with core module installed: % pp -p source.pl # makes source.par % par.pl -b -Opacked.pl source.par # makes packed.pl # Now, deploy 'packed.pl' to target machine... $ perl packed.pl # run it - Perl with PAR.pm and its dependencies installed: % pp -p source.pl # makes source.par % echo "use PAR 'source.par';" > packed.pl; % cat source.pl >> packed.pl; # makes packed.pl # Now, deploy 'source.par' and 'packed.pl' to target machine... $ perl packed.pl # run it Note that if your perl was built with a shared library, the 'Stand-alone setup' above will still need a separate perl5x.dll or libperl.so to function correctly. Patches to include a copy of libperl with the executable are most welcome. Please consult the documentation of 'pp' for more information. * Snapshots The in-development, updated-every-minute snapshot of PAR is available via rsync and http: rsync -avuz rsync://p4.elixus.org/member/autrijus/PAR . http://p4.elixus.org/snap/PAR.tar.gz Change history, opened files and other information are also available from the P4Web interface: http://p4.elixus.org/member/autrijus/PAR/ * Contact is the official PAR website. You can write to the mailing list at , or send an empty mail to to participate in the discussion. Please submit bug reports to . * Copyright Copyright 2002, 2003, 2004 by Autrijus Tang . All rights reserved. You can redistribute and/or modify this bundle under the same terms as Perl itself. See .