Perl::Dist::WiX::BuildPerl::PluginInterface - How to write a plugin to build a new version of Perl.
This documentation describes how to build a plugin to build a new version of perl.
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.
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.
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.
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'.
The perl_version_human accessor returns the "marketing" form (such as "5.12.0") for the distribution.
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].
[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.
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.
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.
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.
Curtis Jewell <email@example.com>
Perl::Dist::WiX, http://ali.as/, http://csjewell.comyr.com/perl/
The license is the same as Perl::Dist::WiX. See that module for details.
To install Perl::Dist::WiX, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.