Skip to content
This repository
Browse code

update POD for some middlewares

Signed-off-by: franck cuny <franck@lumberjaph.net>
  • Loading branch information...
commit e64fe95d99a79e482154a7cf83bc38cd0a5cdbaf 1 parent d5f4e70
Franck Cuny authored
2  lib/Net/HTTP/Spore/Middleware/DoNotTrack.pm
@@ -15,7 +15,7 @@ sub call {
15 15 =head1 SYNOPSIS
16 16
17 17 my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
18   - $client->enable('Runtime');
  18 + $client->enable('DoNotTrack');
19 19
20 20 =head1 DESCRIPTION
21 21
8 lib/Net/HTTP/Spore/Middleware/LogDispatch.pm
... ... @@ -1,5 +1,7 @@
1 1 package Net::HTTP::Spore::Middleware::LogDispatch;
2 2
  3 +# ABSTRACT: Net::HTTP::Spore::Middleware::LogDispatch is a middleware that allow you to use LogDispatch.
  4 +
3 5 use Moose;
4 6 extends 'Net::HTTP::Spore::Middleware';
5 7
@@ -31,9 +33,3 @@ sub call {
31 33
32 34 my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
33 35 $client->enable( 'LogDispatch', logger => $log );
34   -
35   -=head1 DESCRIPTION
36   -
37   -Net::HTTP::Spore::Middleware::LogDispatch is a middleware that allow you to use LogDispatch.
38   -
39   -=head1 EXAMPLES
20 lib/Net/HTTP/Spore/Middleware/Redirection.pm
... ... @@ -1,5 +1,7 @@
1 1 package Net::HTTP::Spore::Middleware::Redirection;
2 2
  3 +# ABSTRACT: Middleware for redirections
  4 +
3 5 use Moose;
4 6
5 7 extends 'Net::HTTP::Spore::Middleware';
@@ -44,3 +46,21 @@ sub call {
44 46 }
45 47
46 48 1;
  49 +
  50 +=head1 SYNOPSIS
  51 +
  52 + my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
  53 + $client->enable( 'Redirection', max_redirect => 2 );
  54 +
  55 + # or
  56 + $client->enable( 'Redirection');
  57 +
  58 +=head1 DESCRIPTION
  59 +
  60 +This middleware let you define how many redirection your client should follow. By default, a client won't follow redirections.
  61 +
  62 +=head2 ATTRIBUTES
  63 +
  64 +=head3 max_redirect
  65 +
  66 +How many redirections the client should follow. Default is 5
15 lib/Net/HTTP/Spore/Role.pm
... ... @@ -1,5 +1,7 @@
1 1 package Net::HTTP::Spore::Role;
2 2
  3 +# ABSTRACT: Role to easily add multiples Spore clients to your class
  4 +
3 5 use MooseX::Role::Parameterized;
4 6 use Net::HTTP::Spore;
5 7
@@ -43,18 +45,17 @@ role {
43 45
44 46 1;
45 47
46   -=head1 NAME
47   -
48   -Net::HTTP::Spore::Role
49   -
50   -=head1 DESCRIPTION
51   -
52 48 =head1 SYNOPSIS
53 49
54 50 package my::app;
55 51 use Moose;
56   - with Net::HTTP::Spore::Role => {name => 'twitter', config => 'twitter_config'};
  52 + with Net::HTTP::Spore::Role =>
  53 + { spore_clients => [ name => 'twitter', config => 'twitter_config' ] };
57 54
58 55 ...
59 56
60 57 my $app = my::app->new(twitter_config => $config->{spore}->{twitter_config});
  58 +
  59 +=head1 DESCRIPTION
  60 +
  61 +This is a role you can apply to your class. This role let you create a Spore client with a specific configuration.

0 comments on commit e64fe95

Please sign in to comment.
Something went wrong with that request. Please try again.