=pod
=head1 NAME
Template::Plugin::NDS_Multi - Interface to Data::NDS::Multi* modules
=head1 SYNOPSIS
[% USE NDS %]
=head1 DESCRIPTION
This allows easy access of data stored in a Data::NDS::Multiele or
Data::NDS::Multifile structure (as documented in those modules).
This deprecates the older Template::Plugin::Multisource module.
=head1 METHODS
In all of the methods described below, obj is the name of a
Data::NDS::Multiele or Data::NDS::Multifile object (unless otherwise
noted). In the calling perl program, this was created and passed in
as:
$obj = new Data::NDS::Multiele;
...
$data = { "obj" => $obj, ... };
$t = Template->new();
$t->process(TEMPLATE,$data);
Template::Plugin::NDS makes the following methods available:
=over 4
=item eles
[% list = NDS_Multi.eles(obj) %]
This returns a list of elements in the object.
=item ele
[% flag = NDS_Multi.ele(obj,ele) %]
This returns 1 if the given element is in any source, 0 otherwise.
=item value
=item keys
=item values
[% val = NDS_Multi.value(obj,ele,path) %]
[% list = NDS_Multi.keys(obj,ele,path) %]
[% list = NDS_Multi.values(obj,ele,path) %]
This returns the value or list of values from the value, keys, and
values methods from the appropriate Data::NDS::* module. Please
refer to that documentation for information.
=item which
[% list = NDS_Multi.which(obj,path,val [,path,val, ...]) %]
This returns a list of all elements which match the criteria passed
in. Refer to the appropriate Data::NDS::* module for the description
of the arguments.
=back
=head1 KNOWN PROBLEMS
None at this point.
=head1 LICENSE
This script is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 AUTHOR
Sullivan Beck (sbeck@cpan.org)
=cut
# =item sources
# [% list = NDS_Multi.sources(obj) %]
# This returns the list of sources in the object.
# =item eles_in_source
# [% list = NDS_Multi.eles_in_source(obj,source) %]
# This returns a list of elements in the given source.
# =item ele_in_sources
# [% list = NDS_Multi.ele_in_sources(obj,ele) %]
# This returns a list of sources containing the given element.
# =item ele_in_source
# [% flag = NDS_Multi.ele_in_source(obj,source,ele) %]
# This returns 1 if the given element is in the source, 0 otherwise.
# =item which_sources
# [% list = NDS_Multi.which_sources(obj,$ele,$path,$flag) %]
# This returns a list of all sources which contain a value for the
# given path for the given element. Refer to the appropriate
# Data::NDS::* module for more information.
# This returns only the list of sources. It does not return the first
# argument ($found) described in the module.