From 1626580443d469406df1312f1cc4050403f179e0 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Thu, 25 Jun 2009 11:02:02 +0200 Subject: async useragent --- lib/MooseX/UserAgent/Async.pm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'lib/MooseX/UserAgent') diff --git a/lib/MooseX/UserAgent/Async.pm b/lib/MooseX/UserAgent/Async.pm index 4adcf9a..3c9a09d 100644 --- a/lib/MooseX/UserAgent/Async.pm +++ b/lib/MooseX/UserAgent/Async.pm @@ -32,3 +32,40 @@ sub fetch { } 1; + +__END__ + +=head1 NAME + +RTGI::Role::UserAgent::Async - Fetch an url using AnyEvent::HTTP + +=head1 SYNOPSIS + + package Foo; + + use Moose; + with qw/MooseX::UserAgent::Async/; + + has useragent_conf => ( + isa => 'HashRef', + default => sub { + { name => 'myownbot', }; + } + ); + + my $res = $self->fetch($url, $cache); + ... + my $content = $self->get_content($res); + +=head1 DESCRIPTION + +=head1 BUGS AND LIMITATIONS + +=head1 AUTHOR + +franck cuny C<< >> + +=head1 LICENCE AND COPYRIGHT + +Copyright (c) 2009, RTGI +All rights reserved. -- cgit 1.4.1