The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

VERSION

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

SYNOPSIS

  my $distribution = Perl::Dist::WiX::Asset::Perl->new(
    parent => $dist, # A Perl::Dist::WiX object.
    url    => 'http://strawberryperl.com/package/perl-5.10.1.tar.gz',
    patch  => [ qw{
        lib/CPAN/Config.pm
        win32/config.gc
        win32/config_sh.PL
        win32/config_H.gc
        }
    ],
    license => {
        'perl-5.10.1/Readme'   => 'perl/Readme',
        'perl-5.10.1/Artistic' => 'perl/Artistic',
        'perl-5.10.1/Copying'  => 'perl/Copying',
        },
  );

  $distribution->install();
  

DESCRIPTION

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

METHODS

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

new

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.

name

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

This defauls to 'perl'.

license

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.

patch

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 makefile.mk is automatically patched and is not mentioned here.

unpack_to

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'.

install_to

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'.

force

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.

git

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.

install

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.

SUPPORT

Bugs should be reported via the CPAN bug tracker at

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Dist-WiX

For other issues, contact the author.

AUTHOR

Curtis Jewell <csjewell@cpan.org>

Adam Kennedy <adamk@cpan.org>

SEE ALSO

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

COPYRIGHT

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.