PAR::Dist - Create and manipulate PAR distributions
As a shell command:
% perl -MPAR::Dist -eblib_to_par
In programs:
use PAR::Dist; my $dist = blib_to_par(); # make a PAR file using ./blib/ install_par($dist); # install it into the system uninstall_par($dist); # uninstall it from the system sign_par($dist); # sign it using Module::Signature verify_par($dist); # verify it using Module::Signature install_par("http://example.com/DBI-latest.par"); # this also works
This module creates and manipulates PAR distributions. They are architecture-specific PAR files, containing everything under blib/ of CPAN distributions after their make or Build stage.
make
Build
The naming convention for such distributions is:
NAME-VERSION-ARCH-PERL_VERSION.par
For example, PAR-Dist-0.01-i386-freebsd-5.8.0.par corresponds to the 0.01 release of PAR-Dist on CPAN, built for perl 5.8.0 running on i386-freebsd.
PAR-Dist-0.01-i386-freebsd-5.8.0.par
PAR-Dist
i386-freebsd
Five functions are exported by default. They can take either a hash of named arguments, a single $dist argument, or no arguments (in which case the first PAR file in the current directory is used).
$dist
Therefore, under a directory containing only a single test.par, all invocations below are equivalent:
% perl -MDist::PAR -e"install_par( dist => 'test.par' )" % perl -MDist::PAR -e"install_par( 'test.par' )" % perl -MDist::PAR -einstall_par;
If $dist resembles a URL, LWP::Simple::mirror is called to mirror it locally under $ENV{PAR_TEMP} (or $TEMP/par/ if unspecified), and the function will act on the fetched local file instead.
LWP::Simple::mirror
$ENV{PAR_TEMP}
$TEMP/par/
Builds a PAR distribution from the blib/ subdirectory under $path, or under the current directory if unspecified. If blib/ does not exist, it automatically runs Build, make, Build.PL or Makefile.PL to create it.
$path
Build.PL
Makefile.PL
Returns the filename or the generated PAR distribution.
Installs a PAR distribution into the system, using ExtUtils::Install::install_default.
ExtUtils::Install::install_default
Uninstalls all previously installed contents of a PAR distribution, using ExtUtils::Install::uninstall.
ExtUtils::Install::uninstall
Digitally sign a PAR distribution using gpg or Crypt::OpenPGP, via Module::Signature.
gpg
Verify the digital signature of a PAR distribution using gpg or Crypt::OpenPGP, via Module::Signature.
Returns a boolean value indicating whether verification passed; $! is set to the return code of Module::Signature::verify.
$!
Module::Signature::verify
PAR, ExtUtils::Install, Module::Signature, LWP::Simple
Autrijus Tang <autrijus@autrijus.org>
PAR has a mailing list, <par@perl.org>, that you can write to; send an empty mail to <par-subscribe@perl.org> to join the list and participate in the discussion.
Please send bug reports to <bug-par@rt.cpan.org>.
Copyright 2003 by Autrijus Tang <autrijus@autrijus.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install PAR::Dist, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PAR::Dist
CPAN shell
perl -MCPAN -e shell install PAR::Dist
For more information on module installation, please visit the detailed CPAN module installation guide.