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

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::DirectoryTree - Base directory tree for Perl::Dist::WiX.

VERSION ^

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

SYNOPSIS ^

        $tree = Perl::Dist::WiX::DirectoryTree->instance();
        
        # See each method for examples.

DESCRIPTION ^

This is an object that represents the main directory tree for the installer. This tree contains all directories being created that are referenced in more than one fragment, and all directories that need to have specific IDs.

METHODS ^

new

        my $tree = Perl::Dist::WiX::DirectoryTree->new(
                app_dir => 'C:\strawberry',
                app_name => 'Strawberry Perl'
        );

Creates new directory tree object and creates the 'root' of the tree.

Note that this object is a MooseX::Singleton object, so that you can retrieve the object at any time using the instance() method.

app_dir

This is set to the distribution's image_dir (where the distribution is going to be installed by default.)

app_name

This is set to the name of the distribution, and is used to set the name of the Start Menu directory containing the distribution's icons.

instance

        my $tree = Perl::Dist::WiX::DirectoryTree->instance();

Returns the previously created directory tree.

get_root

        my $directory_object = $tree->get_root();

Gets the Perl::Dist::WiX::Tag::Directory object at the root of the tree.

as_string

        my $string = $tree->as_string();

This method returns an XML representation of the directory tree.

initialize_tree

        $tree->initialize_tree($perl_version, $bits, $gcc_version);

Adds a basic directory structure to the directory tree object.

initialize_short_tree

        $tree->initialize_short_tree();

Adds a basic directory structure to the directory tree object.

This is used when including a merge module that already contains a Perl::Dist::WiX-based perl distribution.

add_directory

        $tree->add_directory($directory);

Adds a directory to the tree, including all directories required along the way.

add_root_directory

        $self->add_root_directory('Id', 'directory');

Adds a directory entry with the ID and directory name given immediately under the main installation directory.

add_merge_module

        $tree->add_merge_module('C:\strawberry', $mergemodule_object);

This method inserts a merge module (referred to by a Perl::Dist::WiX::Tag::MergeModule object) into the directory tree at the specified directory.

search_dir

Calls Perl::Dist::WiX::Directory's search_dir routine on the root directory with the parameters given.

Checks a cache of successful searches if descend and exact are both 1.

DIAGNOSTICS ^

See Perl::Dist::WiX's DIAGNOSTICS section for details, as all diagnostics from this module are listed there.

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>

SEE ALSO ^

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

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.

syntax highlighting: