NAME
Babble::Utils - Non-essential Babble extensions and utility methods
SYNOPSIS
use Babble::Utils;
use Babble::Cache;
Babble::Cache::cache_load ('cache.db');
my $babble = Babble->new (-cache_fields => ['id', 'date']);
...
$babble->collect_feeds ();
$babble->cache ()
...
Babble::Cache::cache_dump ('cache.db');
DESCRIPTION
Babble::Utils
provides non-essential extensions to a Babble object. All methods herein fall under the Babble namespace, and are available with every Babble instance one makes, when this module is in use.
METHODS
Babble::Utils provides the following methods:
- cache(%params)
-
This function does item caching. It goes over all the items in the Babble object, and stores them in a cache, if they're not present. If they are already present in there, the keys specified in the -cache_fields parameter will be used instead of the items respective keys (ie, the items keys will be replaced from values from the cache). This can be used to cache the approximate date of items which didn't come with a date field by default.
This is just a wrapper around Babble::Cache, really.
AUTHOR
Gergely Nagy, algernon@bonehunter.rulez.org
Bugs should be reported at http://bugs.bonehunter.rulez.org/babble.
SEE ALSO
Babble, Babble::Cache