NAME

Perl::Dist::WiX::Tag::DirectoryRef - <DirectoryRef> tag that knows how to search its children.

VERSION

This document describes Perl::Dist::WiX::Tag::DirectoryRef version 1.500.

SYNOPSIS

my $ref_tag = Perl::Dist::WiX::Tag::DirectoryRef->new(
	directory_object => $directory,
);

# Parameters can be passed as a hash, or a hashref.
# A hashref is shown.
my $dir_tag = $ref_tag->add_directory({
	id => 'Vendor',
	name => 'vendor',
	path => 'C:\strawberry\perl\vendor',
});

my $dir_tag_2 = $ref_tag->get_directory_object('Vendor');

my $dir_tag_3 = $ref_tag->search_dir({
	path_to_find => 'C:\strawberry\perl\vendor',
	descend => 1,
	exact => 1,
});

DESCRIPTION

This is an XML tag that refers to a directory that is used in a Perl::Dist::WiX-based distribution.

METHODS

This class is a WiX3::XML::DirectoryRef and inherits its API, so only additional API is documented here.

new

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

If an error occurs, it throws an exception.

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

get_directory_object

get_directory_object returns the Perl::Dist::WiX::Tag::Directory object with the id that was passed in as the only parameter, as long as it is a child tag of this reference, or a grandchild/great-grandchild/etc. tag.

If you pass the ID of THIS object in, it gets returned.

An undefined value is returned if no object with that ID could be found.

search_dir

Does the same thing, and takes the same parameters, as Perl::Dist::WiX::Tag::Directory's search_dir method.

add_directory

Returns a Perl::Dist::WiX::Tag::Directory tag with the given parameters and adds it as a child of this tag.

The parent parameter to Perl::Dist::WiX::Tag::Directory does not need to be given, as that parameter is given as this object.

get_id

Returns the value of WiX3::XML::DirectoryRef->get_directory_id().

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, http://wix.sourceforge.net/manual-wix3/wix_xsd_directoryref.htm,

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.