HTML::Microformats::ObjectCache(3pm)

HTML::Microformats::ObjectCache3pm

Cache for microformat objects

Overview

Prevents microformats from being parsed twice within the same context.

This is not just for saving time. It also prevents the occasional infinite loop, and makes sure identifiers are used consistently.

Constructor

"$cache = HTML::Microformats::ObjectCache->new"

Creates a new, empty cache.

Public Methods

"$cache->set($context, $package, $element, $object);"

For a given context, package (e.g. 'HTML::Microformats::Format::hCard') and DOM element node, stores an object in the cache.

"$object = $cache->get($context, $package, $element);"

For a given context, package (e.g. 'HTML::Microformats::Format::hCard') and DOM element node, retrieves an object from the cache.

"@objects = $cache->get_all($context, [$package]);"

For a given context and package (e.g. 'HTML::Microformats::Format::hCard'), retrieves a list of objects from within the cache.

Disclaimer of warranties

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Releases

5 releases since Debian 7 (Wheezy); the text changed 3 times.

  1. 7
  2. 8
  3. 9
  4. 12–13

Bugs

Please report any bugs to <http://rt.cpan.org/>.

Author

Toby Inkster <[email protected]>.

From libhtml-microformats-perl 0.105-6 in Debian 13 (Trixie). Parsed by carta from the page's man source.