Perl::Dist::WiX::IconArray - A list of <Icon> tags.
This document describes Perl::Dist::WiX::IconArray version 1.200001.
# Create an icon array my $array = Perl::Dist::WiX::IconArray->new(); # Add an icon to the array, then go looking for it. my $icon_id = $array->add_icon('C:\strawberry\win32\cpan.ico', 'C:\strawberry\perl\bin\cpan.bat'); $icon_id = $array->search_icon('C:\strawberry\win32\cpan.ico', 'bat'); # The second parameters are optional IF you're referring to the msi's icon. my $icon_id_2 = $array->add_icon('C:\strawberry\win32\strawberry.ico'); $icon_id_2 = $array->search_icon('C:\strawberry\win32\strawberry.ico'); # Print out all the icons in XML format. my $xml = $array->as_string();
This stores all the icons that are used in a Perl::Dist::WiX-based installer for Start Menu shortcuts or for the Add/Remove Programs entry, so that they can all be defined in one place when linking the installer together.
The object is not a singleton - maybe it should be?
my $array = Perl::Dist::WiX::IconArray->new();
Creates a new Perl::Dist::WiX::IconArray object.
Perl::Dist::WiX::IconArray
Takes no parameters.
my $icon_id = $array->add_icon('C:\strawberry\win32\cpan.ico', 'C:\strawberry\perl\bin\cpan.bat');
The add_icon routine adds an icon to the array for the icon file referred to in the first parameter, and that targets the file in the second parameter.
add_icon
The second parameter defaults to 'Perl.msi' (which is a shortcut for the icon that should be linked to in Add/Remove Programs for your software.)
Either parameter can be a Path::Class::File.
my $icon_id = $array->search_icon('C:\strawberry\win32\cpan.ico', 'bat');
The search_icon routine searches the array for the ID of the icon object that refers to the icon file in the first parameter, and targets a file with the extension in the second parameter.
search_icon
The second parameter defaults to 'msi'.
my $xml = $array->as_string();
The as_string method returns XML code for all icon objects included in this object.
as_string
See Perl::Dist::WiX::Diagnostics for a list of exceptions that this module can throw.
Bugs should be reported via:
1) The CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Dist-WiX if you have an account there.
2) Email to <bug-Perl-Dist-WiX@rt.cpan.org> if you do not.
For other issues, contact the topmost author.
Curtis Jewell <csjewell@cpan.org>
Adam Kennedy <adamk@cpan.org>
Perl::Dist::WiX, http://ali.as/, http://csjewell.comyr.com/perl/
Copyright 2009 - 2010 Curtis Jewell.
Copyright 2008 - 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 distribution.
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.