NAME

Babble::Transport - Transport abstraction layer for Babble

DESCRIPTION

This module implements a layer that is transport agnostic. That is, one can pass a file, an HTTP URL or the like to this module, and it will delegate the job to an appropriate sub-module. Very useful for fetching feeds, as with Babble::Transport, the feed can be either remote or local, and can be fetched from anywhere Babble::Transport supports, and when one writes new DataSources, the code is reusable.

However, this should not be used outside of Babble::DataSource classes.

METHODS

get

Return the contents of a given location (given in the -location argument) as a string scalar. If a -cache_db argument is given, this method will use the given file as a cache - to save successfully retrieved feeds and to check the cache if it has an older version, in case the feed couldn't be retrieved. Caching is done via Babble::Cache.

If a -preprocessors parameter is given, the result will be filtered through the coderefs contained in this arrayref. The function should take only one argument: a scalar reference, and operate on that in-place.

AUTHOR

Gergely Nagy, algernon@bonehunter.rulez.org

Bugs should be reported at http://bugs.bonehunter.rulez.org/babble.

SEE ALSO

Babble::Transport::LWP, Babble::Cache