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

NAME

Perl::Dist::WiX::Asset::Binary - "Binary Package" asset for a Win32 Perl

VERSION

This document describes Perl::Dist::WiX::Asset::Binary version 1.500.

SYNOPSIS

  my $binary = Perl::Dist::WiX::Asset::Binary->new(
      name       => 'dmake',
      license    => {
          'dmake/COPYING'            => 'dmake/COPYING',
          'dmake/readme/license.txt' => 'dmake/license.txt',
      },
      install_to => {
          'dmake/dmake.exe' => 'c/bin/dmake.exe',       
          'dmake/startup'   => 'c/bin/startup',
      },
  );
  

DESCRIPTION

Perl::Dist::WiX::Asset::Binary is a data class that provides encapsulation and error checking for a "binary package" to be installed in a Perl::Dist::WiX-based Perl distribution.

It is normally created on the fly by the Perl::Dist::WiX::Mixin::Installation install_binary method (and other things that call it).

These packages will be simple zip or tar.gz files that are local files, installed in a CPAN distribution's 'share' directory, or retrieved from the internet via a URI.

The specification of the location to retrieve the package is done via the standard mechanism implemented in Perl::Dist::WiX::Role::Asset.

METHODS

This class inherits from 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::Binary 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 required name parameter is the name of the package for the purposes of identification in messages.

install_to

The required install_to parameter allows you to specify which directories or files get installed in which subdirectories of the image directory of the distribution.

If a string is passed in, it is a location relative to the image directory, and the whole binary is extracted to that location.

If a hash reference is passed in, the keys are the directories or files to extract from the archive file, while the values are the locations to extract the directories or files to, relative to the image directory of the distribution.

Although this param does not default when called directly, in practice the Perl::Dist::WiX install_binary method will default this value to "c", as most binary installations are for C toolchain tools or pre-compiled C libraries.

license

The 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. If the tarball is properly made, the filenames will include the name and version of the library.

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

install

The install method extracts and installs the archive file using the directions described in the Perl::Dist::WiX::Asset::Binary object.

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>

SEE ALSO

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

COPYRIGHT AND LICENSE

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.