Perl::Dist::WiX::Asset::Perl - "Perl core" asset for a Win32 Perl


This document describes Perl::Dist::WiX::Asset::Perl version 1.500002.


  my $distribution = Perl::Dist::WiX::Asset::Perl->new(
    parent => $dist, # A Perl::Dist::WiX object.
    url    => '',
    patch  => [ qw{
    license => {
        'perl-5.10.1/Readme'   => 'perl/Readme',
        'perl-5.10.1/Artistic' => 'perl/Artistic',
        'perl-5.10.1/Copying'  => 'perl/Copying',



This asset downloads the Perl source code for a given version of Perl and patches and installs it into a specified directory


This class is a Perl::Dist::WiX::Role::Asset and shares its API.


The new constructor takes a series of parameters, validates then and returns a new Perl::Dist::WiX::Asset::Perl object.

It inherits all the parameters described in the Perl::Dist::WiX::Role::Asset->new() method documentation, and adds the additional parameters described below.


The name parameter is the name of the package for the purposes of identification in messages.

This defauls to 'perl'.


The required license parameter allows you to specify which files get copied to the license directory of the distribution.

The keys are the files to copy, as relative filenames from the subdirectory named in unpack_to. (Git checkouts are copied to a directory named 'perl-git', and that directory needs to be specified in the keys.)

The values are the locations to copy them to, relative to the license directory of the distribution.


The required patch parameter allows you to specify which files get patched before the distribution is built.

These files will be passed to the routine _find_perl_file, which will check the share directory of each plugin module(s) that was/were loaded for the named file, and return the correct location.

VERSION is 'git' for git checkouts.

The patch files can either have the names of original files (in which case the files are copied) or can have an additional extension of .tt (in which case the files are processed through Template Toolkit, with the parameters described in Perl::Dist::WiX->patch_file().)

The is automatically patched and is not mentioned here.


The optional unpack_to parameter allows you to specify in which subdirectory of the build directory the tarball gets unpacked to or the checkout gets copied to.

This defaults to 'perl'.


The optional install_to parameter allows you to specify in which subdirectory of the image directory the Perl distribution gets installed to.

This defaults to 'perl'.


The optional boolean force param allows you to specify that the tests should be skipped and Perl installed without validating it.

This defaults to true if either the force() or forceperl() attributes of the Perl::Dist::WiX parent object are true. Otherwise, it defaults to false.


The optional git param specifies, if defined, that:

1) Perl is being built from a checkout directory, as opposed to a tarball, and

2) The "git describe" output is as specified in this parameter.

This defaults to undef, and needs to be specified for building a git checkout.


The install method installs the Perl distribution described by the Perl::Dist::WiX::Asset::Perl object and returns true or throws an exception.

The install method takes care of the detailed process of building the Perl binary and installing it into the distribution.

A short summary of the process would be that it downloads or otherwise fetches the package that was named when the object is created, unpacks it, copies out any license files from the source code, then tweaks the Win32 makefile to point to the specific build directory, and then runs make/make test/make install.

Returns true (after 20 minutes or so) or throws an exception on error.


Bugs should be reported via the CPAN bug tracker at

For other issues, contact the author.


Curtis Jewell <>

Adam Kennedy <>


Perl::Dist::WiX, Perl::Dist::WiX::Role::Asset


Copyright 2009 - 2010 Curtis Jewell.

Copyright 2007 - 2009 Adam Kennedy.

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

The full text of the license can be found in the LICENSE file included with this module.