|
Babble::Document - Babble document container class |
Babble::Document - Babble document container class
A Babble::Document object represents one entry in the whole collection a Babble is working with.
A Babble::Document object has the following basic properties:
Other properties might be present, but they are not standardised by this class. However, preprocessors and DataSources are free to add others.
new()date()date_iso()date_rss()date_text()date_date()search($filters)The filters are simple hashrefs, with two mandatory keys: field and pattern. The first one determines which field the search is performed on (this can be any one of the available Babble::Document properties), and pattern is the pattern it should match.
Optional keys include inverse, which reverses the check, and cmp, which will be used as a comparsion function if set, instead of the default regexp matcher.
all()all() can call $doc->all(), which in
turn makes it possible to have Babble::Document::Collections nested,
and still work.
Gergely Nagy, algernon@bonehunter.rulez.org
Bugs should be reported at http://bugs.bonehunter.rulez.org/babble.
Babble, Babble::Document::Collection
|
Babble::Document - Babble document container class |