NAME
Gestinanna::POF::Container - Aggregation of POF object classes
SYNOPSIS
package My::DataObject;
use base qw(Gestinanna::POF::Container);
__PACKAGE__ -> contained_objects(
name => class,
);
__PACKAGE__ -> attribute_mappings(
name => { external => internal },
);
DESCRIPTION
This is a container object. It allows consolidation of multiple data sources into a single object. Data requests are passed to the contained objects transparently.
Attributes that are for specific contained objects may be prefixed with the name of the contained object. These will override any general attributes passed in to the container constructor.
Attributes names may be mapped from the container's published set to the contained objects set. This allows two contained objects with the same attribute name to expose that attribute through the container as two different attributes. N.B.: this does not affect attribute names during the container's creation. This only affects attribute value retrieval and storage.
BUGS
These are more caveats than bugs since they reveal some of the limitations in aggregating data sources without being horribly inefficient.
find
Combining iterators from aggregated data stores
Gestinanna::POF::Container
handles searches a little differently because it is aggregating data from multiple data sources. It will try and construct an iterator for each data source. As long as at least one data source successfully constructs an iterator, this module will return an iterator.If the top-level grouping in the search is
OR
, then the resulting iterator will return the union of the results from the other iterators without duplicating object identifiers. If the top-level grouping in the search isAND
, then the resulting iterator will return the intersection of the results from the other iterators.In some cases, this behavior may result in slightly different search results than if all the data were in one data store.
Comparing one attribute to another attribute
Two attributes can be compared to each other only if they are in the same data store. This module does not support comparing across data stores since this would be terrible inefficient and the code constructing the search should not be aware of such boundaries. Patches are welcome to make cross-data-store searching a selectable behavior.
AUTHOR
James Smith, <jsmith@cpan.org>
COPYRIGHT
Copyright (C) 2002-2003 Texas A&M University. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.