Zim::Selection.3pm

Langue: en

Version: 2009-03-16 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Zim::Selection - selection of pages

SYNOPSIS

FIXME simple code example

DESCRIPTION

This class is used to manage selections of pages. The pages are still asociates with a repository, this object can be used to call operations on a sub-set of a repository.

Inherits from Zim::Store.

METHODS

"new($REPOSITORY, \%OPT, @PAGES)"
Constructor. REPOSITORY should be an object of class Zim or Zim::Store and is the object used to look up the pages in the selection.

The OPT hash can contain several options. Curently only ``recurse'' and ``resolve'' are recognized. If ``recurse'' is set for all pages the corresponding namespace is also added. If ``resolve'' is set the page list is treated as user input.

The list of PAGES can contain both pages and namespaces. Namespaces are always added recursively.

"root()"
Returns self, needed to use selection as mock repository in tests.
"resolve_case(\@NAME, \@REF)"
Used to resolve pages against paths in the selection.
"foreach(\&CODE, \@ARGS)"
The code reference CODE is called for each page with as arguments ARGS and the page object.
"parse_query(STRING)"
Returns a data structure for a search query. See user manual for syntax description.
"export($TARGET)"
"export(\%OPT)"
Export the pages to TARGET, which should be a repository.

When called with a hash of options, these options are used to open the target repository. At least provide the options 'dir' and 'format'. You can also give 'template', which can be a template name or a file name. When no template is given we try to use template 'Default' but fail silently.

AUTHOR

Jaap Karssenberg (Pardus) <pardus@cpan.org>

Copyright (c) 2006 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO