Benjamin Trott > URI-Fetch-0.01 > URI::Fetch

Download:
URI-Fetch-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  4
Open  0
View Bugs
Report a bug
Module Version: 0.01   Source   Latest Release: URI-Fetch-0.08

NAME ^

URI::Fetch - Smart URI fetching (for syndication feeds, in particular)

SYNOPSIS ^

    use URI::Fetch;

    ## Simple fetch.
    my $res = URI::Fetch->fetch('http://example.com/atom.xml')
        or die URI::Fetch->errstr;

    ## Fetch using specified ETag and Last-Modified headers.
    my $res = URI::Fetch->fetch('http://example.com/atom.xml', {
            ETag => '123-ABC',
            LastModified => time - 3600,
    })
        or die URI::Fetch->errstr;

    ## Fetch using an on-disk cache that URI::Fetch manages for you.
    my $cache = Cache::File->new( cache_root => '/tmp/cache' );
    my $res = URI::Fetch->fetch('http://example.com/atom.xml', {
            Cache => $cache
    })
        or die URI::Fetch->errstr;

DESCRIPTION ^

URI::Fetch is a smart client for fetching syndication feeds (RSS, Atom, and others) in an intelligent, bandwidth- and time-saving way. That means:

USAGE ^

URI::Fetch->fetch($uri, %param)

Fetches a syndication feed identified by the URI $uri.

On success, returns a URI::Fetch::Response object; on failure, returns undef.

%param can contain:

LICENSE ^

URI::Fetch is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR & COPYRIGHT ^

Except where otherwise noted, URI::Fetch is Copyright 2004 Benjamin Trott, ben+cpan@stupidfool.org. All rights reserved.