Perl::Dist::WiX::DirectoryCache - Cache of <Directory> tag objects.
This document describes Perl::Dist::WiX::DirectoryCache version 1.500.
# Since this is a singleton, ->instance() retrieves the cache object # (creating the cache object if needed) my $cache = Perl::Dist::WiX::DirectoryCache->instance(); $cache->add_to_cache($directory_object, $fragment_object); my $exists = $cache->exists_in_cache($directory_object); my $fragment_id = $cache->get_previous_fragment($directory_object); $cache->delete_cache_entry($directory_object);
This object is a singleton designed to cache objects representing all directories to be created by a
The cache is used during the
regenerate_fragments task so that a directory (defined by a Perl::Dist::WiX::Tag::Directory object) is only defined once, no matter how many fragments it is used in. (There can be as many references to a directory, defined by Perl::Dist::WiX::Tag::DirectoryRef objects, as required.)
Returns the cache object. (Use this instead of
$cache->add_to_cache($directory_object, $fragment_object); This method adds the directory object to the cache, and references the fact that it is being created in the fragment object.
my $exists = $cache->exists_in_cache($directory_object);
This method returns a true value if a directory object representing the same directory is already in the cache. Otherwise, it returns a false value.
my $fragment_id = $cache->get_previous_fragment($directory_object);
This method returns the ID of the fragment that's already creating this directory. If there is no fragment already creating this directory, this method returns an undefined value.
This method removes the ID of the fragment that's already assigned to this directory in the cache.
This method is used when a directory that two or more fragments want to create is added to the directory tree object instead.
This clears the cache for a new build.
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 <email@example.com>
Adam Kennedy <firstname.lastname@example.org>
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.