Steffen Müller
and 1 contributors


PAR::Dist::FromCPAN - Create PAR distributions from CPAN


  use PAR::Dist::FromCPAN;
  # Creates a .par distribution of the Math::Symbolic module in the
  # current directory.
  cpan_to_par(pattern => '^Math::Symbolic$');
  # The same, but also create .par distributions for Math::Symbolic's
  # dependencies and run all tests.
  cpan_to_par(pattern => '^Math::Symbolic$', follow => 1, test => 1);
  # Create distributions for all modules below the 'Math::Symbolic'
  # namespace in the 'par-dist/' subdirectory and be verbose about it.
    pattern => '^Math::Symbolic',
    out     => 'par-dist/',
    verbose => 1,


This module creates PAR distributions from any number of modules from CPAN. It exports the cpan_to_par subroutine for this task.


By default, the cpan_to_par subroutine is exported to the callers namespace.


This is a list of all public subroutines in the module.


The only mandatory parameter is a pattern matching the modules you wish to create PAR distributions from. This works the same way as, for example cpan install MODULEPATTERN.


  pattern    => 'patternstring'
  out        => 'directory'  (write distribution files to this directory)
  verbose    => 1/0 (verbose mode on/off)
  test       => 1/0 (run module tests on/off)
  follow     => 1/0 (also create distributions for dependencies on/off)
  merge      => 1/0 (merge everything into one .par archive)
  strip_docs => 1/0 (strip all man* and html documentation)
  skip       => \@ary (skip all modules that match any of the regular
                       expressions in @ary)
  auto_detect_pure_perl => 1/0 (Flags the PAR distribution platform and
                                perl version agnostic if it is deemed
  perl_version => Defaults to your version of Perl. Used to determine
                  which modules are core perl and thus will be skipped.
                  Set this to 0 to package all core modules as well.


The PAR::Dist module is used to create .par distributions from an unpacked CPAN distribution. The CPAN module is used to fetch the distributions from the CPAN.

PAR has a mailing list, <>, that you can write to; send an empty mail to <> to join the list and participate in the discussion.

Please send bug reports to <>.

The official PAR website may be of help, too:


Steffen Mueller, <smueller at cpan dot org>

Jesse Vincent


Copyright (C) 2006-2009 by Steffen Mueller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6 or, at your option, any later version of Perl 5 you may have available.