Curtis Jewell > Perl-Dist-WiX-1.500002 > Perl::Dist::WiX::BuildPerl::PluginInterface

Download:
Perl-Dist-WiX-1.500002.tar.gz

Annotate this POD

Website

CPAN RT

New  1
Open  3
View/Report Bugs
Source  

NAME ^

Perl::Dist::WiX::BuildPerl::PluginInterface - How to write a plugin to build a new version of Perl.

DESCRIPTION ^

This documentation describes how to build a plugin to build a new version of perl.

PLUGIN INTERFACE ^

Subroutines

_install_perl_plugin

This routine is the one that actually builds perl and knows about what files to patch.

It checks to make sure that 'dmake' is installed, then gets the list of toolchain modules, creates a Perl asset object, and builds perl.

It should be defined in the plugin as an 'around' method modifier that does not call the original routine that is passed in.

The base routine is defined (to throw a PDWiX::Unimplemented exception) in Perl::Dist::WiX::Mixin::BuildPerl.

_find_perl_file

This routine is the one that, given the name of a file to patch as the first parameter (relative to the perl source root directory), returns the location of the patch file on disk.

It should be defined in the plugin as an 'around' method modifier that either returns a value, or calls the 'original' routine that is passed in.

The base routine is defined to return undef (indicating that the file could not be found) in Perl::Dist::WiX::Mixin::BuildPerl.

Accessors

These accessors only need defined in Perl::Dist::WiX::BuildPerl::* plugins. Plugins for classes that override Perl::Dist::WiX will use the accessors defined from the base class plugins.

perl_version_literal

The perl_version_literal accessor returns the literal (5.0xx00y) version for the distribution. For example, if perl 5.12.0 is being built, this accessor returns '5.012000'.

perl_version_human

The perl_version_human accessor returns the "marketing" form (such as "5.12.0") for the distribution.

head3 _perl_version_arrayref

The _perl_version_arrayref accessor returns the three components of the version of perl being built, as an array reference. For example, if perl 5.12.0 is being built, this routine returns [5, 12, 0].

Versions of perl being built off of a Git snapshot should answer with the next development release of perl if built off of blead, or the next maintenance release if built off of a maintenance branch.

head3 _perl_bincompat_version_arrayref

The _perl_bincompat_version_arrayref accessor also returns an array reference, but of the last version of perl that is not binary-compatible with the version of perl being built.

For 5.y.0 versions, the components returned are [5, y-1, 255].

For 5.y.x versions, where x is non-zero and y is even, the components returned are [5, y, 0], unless there was a specific bug that had to be fixed that broke XS binary compatibility.

This should return the same thing as _perl_version_arrayref() for versions based off of a git snapshot, or of a development version of perl.

head3 _is_git_snapshot

The _is_git_snapshot accessor returns a true value (specifically, the first 7 digits of the SHA-1 that was used to generate this plugin, prefixed with a 'g') if this is meant to build from a git snapshot.

Otherwise, it returns false - specifically, the empty string.

Roles

Perl::Dist::WiX::Role::GitPlugin

Plugins for git checkouts must compose this role (using with "Perl::Dist::WiX::Role::GitPlugin";) so that the git_describe() accessor can be used, and that Perl::Dist::WiX can detect that this is a checkout-using plugin.

AUTHORS ^

Curtis Jewell <csjewell@cpan.org>

SEE ALSO ^

Perl::Dist::WiX, http://ali.as/, http://csjewell.comyr.com/perl/

COPYRIGHT AND LICENSE ^

The license is the same as Perl::Dist::WiX. See that module for details.

syntax highlighting: