Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update POD for some middlewares

Signed-off-by: franck cuny <franck@lumberjaph.net>
  • Loading branch information...
commit e64fe95d99a79e482154a7cf83bc38cd0a5cdbaf 1 parent d5f4e70
@franckcuny authored
View
2  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
View
8 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
View
20 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
View
15 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.
Please sign in to comment.
Something went wrong with that request. Please try again.