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 => '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();
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.
new
Perl::Dist::WiX::Asset::Perl
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.
name
This defauls to 'perl'.
The required license parameter allows you to specify which files get copied to the license directory of the distribution.
license
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.)
unpack_to
'perl-git'
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.
patch
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.
_find_perl_file
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().)
.tt
The makefile.mk 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.
install_to
The optional boolean force param allows you to specify that the tests should be skipped and Perl installed without validating it.
force
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.
Perl::Dist::WiX
The optional git param specifies, if defined, that:
git
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.
install
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
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Dist-WiX
For other issues, contact the author.
Curtis Jewell <csjewell@cpan.org>
Adam Kennedy <adamk@cpan.org>
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.
To install Perl::Dist::WiX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Dist::WiX
CPAN shell
perl -MCPAN -e shell install Perl::Dist::WiX
For more information on module installation, please visit the detailed CPAN module installation guide.