summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-09-15 11:33:59 +0200
committerfranck cuny <franck@lumberjaph.net>2010-09-15 11:33:59 +0200
commit73c83bd168f04287387ad2322d70fbf1923a0d64 (patch)
tree9fb0e33999eb5cb09119bf0a41ee42409564d9c9
parentPOD for mw runtime (diff)
downloadnet-http-spore-73c83bd168f04287387ad2322d70fbf1923a0d64.tar.gz
POD for mw useragent
-rw-r--r--lib/Net/HTTP/Spore/Middleware/UserAgent.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore/Middleware/UserAgent.pm b/lib/Net/HTTP/Spore/Middleware/UserAgent.pm
index 0517c26..c65c5b1 100644
--- a/lib/Net/HTTP/Spore/Middleware/UserAgent.pm
+++ b/lib/Net/HTTP/Spore/Middleware/UserAgent.pm
@@ -1,5 +1,7 @@
 package Net::HTTP::Spore::Middleware::UserAgent;
 
+# ABSTRACT: middleware to change the user-agent value
+
 use Moose;
 extends qw/Net::HTTP::Spore::Middleware/;
 
@@ -11,5 +13,13 @@ sub call {
     $req->header('User-Agent' => $self->useragent);
 }
 
-
 1;
+
+=head1 SYNOPSIS
+
+    my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
+    $client->enable('UserAgent', useragent => 'Mozilla/5.0 (X11; Linux x86_64; rv:2.0b4) Gecko/20100818 Firefox/4.0b4');
+
+=head1 DESCRIPTION
+
+Net::HTTP::Spore::Middleware::UserAgent change the default value of the useragent.