NAME

Perl::Dist::WiX::Fragment::Environment - A <Fragment> tag with environment variable handling.

VERSION

This document describes Perl::Dist::WiX::Fragment::Environment version 1.250_100.

SYNOPSIS

my $fragment = Perl::Dist::WiX::Fragment::Environment->new(
	id => 'Environment',
);

# If there is only one parameter, it is considered to be the id.
my $fragment2 = Perl::Dist::WiX::Fragment::Environment->new('Environment');

$fragment->add_entry(
	id     => "Env_STRAWBERRY",
	name   => 'STRAWBERRY',
	value  => '1',
	action => 'set',
	part   => 'all',
);

my $count = $fragment->get_entries_count();

DESCRIPTION

This module implements the fragment that adds, deletes, and appends the environment variables required in a distribution.

METHODS

This class inherits from WiX3::XML::Fragment and shares its API.

new

The new constructor takes a series of parameters, validates then and returns a new Perl::Dist::WiX::Fragment::Environment object.

It inherits all the parameters described in the WiX3::XML::Fragment->new() method documentation.

If new has only one parameter, it is considered the ID to use for the fragment.

add_entry

$fragment_tag = $fragment_tag->add_entry(...);

The add_entry method creates an <Environment> tag (a WiX3::XML::Environment object) and adds it as a child of the component this fragment contains.

It takes all parameters that WiX3::XML::Environment->new() takes.

get_entries_count

$count = $fragment_tag->get_entries_count();

The get_entries_count method returns the number of <Environment> tags that this fragment contains.

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

COPYRIGHT

Copyright 2009 - 2010 Curtis Jewell.

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.