Curtis Jewell > Perl-Dist-WiX-1.500002 > Perl::Dist::WiX::IconArray

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

Dependencies

Annotate this POD

Website

CPAN RT

New  1
Open  3
View/Report Bugs
Module Version: 1.500   Source  

NAME ^

Perl::Dist::WiX::IconArray - A list of <Icon> tags.

VERSION ^

This document describes Perl::Dist::WiX::IconArray version 1.500.

SYNOPSIS ^

        # 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();

DESCRIPTION ^

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?

INTERFACE ^

new

        my $array = Perl::Dist::WiX::IconArray->new();

Creates a new Perl::Dist::WiX::IconArray object.

Takes no parameters.

add_icon

        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.

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.

search_icon

        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.

The second parameter defaults to 'msi'.

as_string

        my $xml = $array->as_string();

The as_string method returns XML code for all icon objects included in this object.

DIAGNOSTICS ^

See Perl::Dist::WiX::Diagnostics for a list of exceptions that this module can throw.

BUGS AND LIMITATIONS (SUPPORT) ^

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.

AUTHORS ^

Curtis Jewell <csjewell@cpan.org>

Adam Kennedy <adamk@cpan.org>

SEE ALSO ^

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

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: