summaryrefslogtreecommitdiff
path: root/lib/Plack/Middleware/Throttle/Daily.pm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Plack/Middleware/Throttle/Daily.pm42
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/Plack/Middleware/Throttle/Daily.pm b/lib/Plack/Middleware/Throttle/Daily.pm
index d28d1d7..378ce17 100644
--- a/lib/Plack/Middleware/Throttle/Daily.pm
+++ b/lib/Plack/Middleware/Throttle/Daily.pm
@@ -15,3 +15,45 @@ sub reset_time {
}
1;
+__END__
+
+=head1 NAME
+
+Plack::Middleware::Throttle::Daily - A Plack Middleware for rate-limiting incoming HTTP requests.
+
+=head1 SYNOPSIS
+
+ my $handler = builder {
+ enable "Throttle::Daily",
+ max => 2,
+ backend => Plack::Middleware::Throttle::Backend::Hash->new();
+ sub { [ '200', [ 'Content-Type' => 'text/html' ], ['hello world'] ] };
+ };
+
+=head1 DESCRIPTION
+
+How many request an host can do in one day.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<max>
+
+How many requets can be done in one day.
+
+=back
+
+=head1 AUTHOR
+
+franck cuny E<lt>franck@lumberjaph.netE<gt>
+
+=head1 SEE ALSO
+
+=head1 LICENSE
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+