summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-07-26 12:11:38 +0200
committerfranck cuny <franck@lumberjaph.net>2011-07-26 13:21:03 +0200
commite64fe95d99a79e482154a7cf83bc38cd0a5cdbaf (patch)
tree3a466cc51a22fd80525b234d49d951382f9f9c5d
parentfix broken POD (diff)
downloadnet-http-spore-e64fe95d99a79e482154a7cf83bc38cd0a5cdbaf.tar.gz
update POD for some middlewares
Signed-off-by: franck cuny <franck@lumberjaph.net>
-rw-r--r--lib/Net/HTTP/Spore/Middleware/DoNotTrack.pm2
-rw-r--r--lib/Net/HTTP/Spore/Middleware/LogDispatch.pm8
-rw-r--r--lib/Net/HTTP/Spore/Middleware/Redirection.pm20
-rw-r--r--lib/Net/HTTP/Spore/Role.pm15
4 files changed, 31 insertions, 14 deletions
diff --git a/lib/Net/HTTP/Spore/Middleware/DoNotTrack.pm b/lib/Net/HTTP/Spore/Middleware/DoNotTrack.pm
index 9df053a..ae08bed 100644
--- a/lib/Net/HTTP/Spore/Middleware/DoNotTrack.pm
+++ b/lib/Net/HTTP/Spore/Middleware/DoNotTrack.pm
@@ -15,7 +15,7 @@ sub call {
 =head1 SYNOPSIS
 
     my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
-    $client->enable('Runtime');
+    $client->enable('DoNotTrack');
 
 =head1 DESCRIPTION
 
diff --git a/lib/Net/HTTP/Spore/Middleware/LogDispatch.pm b/lib/Net/HTTP/Spore/Middleware/LogDispatch.pm
index 422c76d..43685eb 100644
--- a/lib/Net/HTTP/Spore/Middleware/LogDispatch.pm
+++ b/lib/Net/HTTP/Spore/Middleware/LogDispatch.pm
@@ -1,5 +1,7 @@
 package Net::HTTP::Spore::Middleware::LogDispatch;
 
+# ABSTRACT: Net::HTTP::Spore::Middleware::LogDispatch is a middleware that allow you to use LogDispatch.
+
 use Moose;
 extends 'Net::HTTP::Spore::Middleware';
 
@@ -31,9 +33,3 @@ sub call {
 
     my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
     $client->enable( 'LogDispatch', logger => $log );
-
-=head1 DESCRIPTION
-
-Net::HTTP::Spore::Middleware::LogDispatch is a middleware that allow you to use LogDispatch.
-
-=head1 EXAMPLES
diff --git a/lib/Net/HTTP/Spore/Middleware/Redirection.pm b/lib/Net/HTTP/Spore/Middleware/Redirection.pm
index d80c47c..66e3a5a 100644
--- a/lib/Net/HTTP/Spore/Middleware/Redirection.pm
+++ b/lib/Net/HTTP/Spore/Middleware/Redirection.pm
@@ -1,5 +1,7 @@
 package Net::HTTP::Spore::Middleware::Redirection;
 
+# ABSTRACT: Middleware for redirections
+
 use Moose;
 
 extends 'Net::HTTP::Spore::Middleware';
@@ -44,3 +46,21 @@ sub call {
 }
 
 1;
+
+=head1 SYNOPSIS
+
+    my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
+    $client->enable( 'Redirection', max_redirect => 2 );
+
+    # or
+    $client->enable( 'Redirection');
+
+=head1 DESCRIPTION
+
+This middleware let you define how many redirection your client should follow. By default, a client won't follow redirections.
+
+=head2 ATTRIBUTES
+
+=head3 max_redirect
+
+How many redirections the client should follow. Default is 5
diff --git a/lib/Net/HTTP/Spore/Role.pm b/lib/Net/HTTP/Spore/Role.pm
index fae079d..368edf1 100644
--- a/lib/Net/HTTP/Spore/Role.pm
+++ b/lib/Net/HTTP/Spore/Role.pm
@@ -1,5 +1,7 @@
 package Net::HTTP::Spore::Role;
 
+# ABSTRACT: Role to easily add multiples Spore clients to your class
+
 use MooseX::Role::Parameterized;
 use Net::HTTP::Spore;
 
@@ -43,18 +45,17 @@ role {
 
 1;
 
-=head1 NAME
-
-Net::HTTP::Spore::Role
-
-=head1 DESCRIPTION
-
 =head1 SYNOPSIS
 
   package my::app;
   use Moose;
-  with Net::HTTP::Spore::Role => {name => 'twitter', config => 'twitter_config'};
+  with Net::HTTP::Spore::Role =>
+    { spore_clients => [ name => 'twitter', config => 'twitter_config' ] };
 
   ...
 
   my $app = my::app->new(twitter_config => $config->{spore}->{twitter_config});
+
+=head1 DESCRIPTION
+
+This is a role you can apply to your class. This role let you create a Spore client with a specific configuration.