Plack-Middleware-Greylist
view release on metacpan or search on metacpan
"Test::TrailingSpace" : "0.0203",
"Test::Vars" : "0",
"Test::Version" : "1",
"strict" : "0"
}
},
"runtime" : {
"recommends" : {
"Cache::FastMmap" : "1.52",
"Net::IP::LPM" : "1.11",
"Ref::Util::XS" : "0"
},
"requires" : {
"HTTP::Status" : "0",
"List::Util" : "1.29",
"Module::Load" : "0",
"Net::IP::LPM" : "0",
"Plack::Middleware" : "0",
"Ref::Util" : "0",
"Time::Seconds" : "0",
"experimental" : "0",
"parent" : "0",
"perl" : "v5.20.0",
"warnings" : "0"
}
},
"test" : {
"recommends" : {
"CPAN::Meta" : "2.120900"
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Plack-Middleware-Greylist
provides:
Plack::Middleware::Greylist:
file: lib/Plack/Middleware/Greylist.pm
version: v0.8.2
recommends:
Cache::FastMmap: '1.52'
Net::IP::LPM: '1.11'
Ref::Util::XS: '0'
requires:
HTTP::Status: '0'
List::Util: '1.29'
Module::Load: '0'
Net::IP::LPM: '0'
Plack::Middleware: '0'
Ref::Util: '0'
Time::Seconds: '0'
experimental: '0'
parent: '0'
perl: v5.20.0
warnings: '0'
resources:
bugtracker: https://github.com/robrwo/Plack-Middleware-Greylist/issues
repository: git://github.com/robrwo/Plack-Middleware-Greylist.git
version: v0.8.2
x_authority: cpan:RRWO
Makefile.PL view on Meta::CPAN
"DISTNAME" => "Plack-Middleware-Greylist",
"LICENSE" => "artistic_2",
"MIN_PERL_VERSION" => "5.020000",
"NAME" => "Plack::Middleware::Greylist",
"PREREQ_PM" => {
"HTTP::Status" => 0,
"List::Util" => "1.29",
"Module::Load" => 0,
"Net::IP::LPM" => 0,
"Plack::Middleware" => 0,
"Ref::Util" => 0,
"Time::Seconds" => 0,
"experimental" => 0,
"parent" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"Cache::FastMmap" => "1.52",
"File::Spec" => 0,
"HTTP::Request::Common" => 0,
"IO::Handle" => 0,
Makefile.PL view on Meta::CPAN
"Module::Metadata" => "1.000015",
"Net::IP::LPM" => 0,
"Path::Tiny" => 0,
"Plack::Builder" => 0,
"Plack::Middleware" => 0,
"Plack::Middleware::ContentLength" => 0,
"Plack::Middleware::Head" => 0,
"Plack::Middleware::ReverseProxy" => 0,
"Plack::Response" => 0,
"Plack::Test" => 0,
"Ref::Util" => 0,
"Test2::Tools::Compare" => 0,
"Test2::V0" => 0,
"Test::More" => 0,
"Time::Seconds" => 0,
"experimental" => 0,
"parent" => 0,
"strict" => 0,
"warnings" => 0
);
# REQUIREMENTS
This module lists the following modules as runtime dependencies:
- [HTTP::Status](https://metacpan.org/pod/HTTP%3A%3AStatus)
- [List::Util](https://metacpan.org/pod/List%3A%3AUtil) version 1.29 or later
- [Module::Load](https://metacpan.org/pod/Module%3A%3ALoad)
- [Net::IP::LPM](https://metacpan.org/pod/Net%3A%3AIP%3A%3ALPM)
- [Plack::Middleware](https://metacpan.org/pod/Plack%3A%3AMiddleware)
- [Ref::Util](https://metacpan.org/pod/Ref%3A%3AUtil)
- [Time::Seconds](https://metacpan.org/pod/Time%3A%3ASeconds)
- [experimental](https://metacpan.org/pod/experimental)
- [parent](https://metacpan.org/pod/parent)
- [perl](https://metacpan.org/pod/perl) version v5.20.0 or later
- [warnings](https://metacpan.org/pod/warnings)
See the `cpanfile` file for the full list of prerequisites.
# INSTALLATION
# This file is generated by Dist::Zilla::Plugin::CPANFile v6.038
# Do not edit this file directly. To change prereqs, edit the `dist.ini` file.
requires "HTTP::Status" => "0";
requires "List::Util" => "1.29";
requires "Module::Load" => "0";
requires "Net::IP::LPM" => "0";
requires "Plack::Middleware" => "0";
requires "Ref::Util" => "0";
requires "Time::Seconds" => "0";
requires "experimental" => "0";
requires "parent" => "0";
requires "perl" => "v5.20.0";
requires "warnings" => "0";
recommends "Cache::FastMmap" => "1.52";
recommends "Net::IP::LPM" => "1.11";
recommends "Ref::Util::XS" => "0";
on 'build' => sub {
requires "ExtUtils::MakeMaker" => "7.22";
requires "Module::Metadata" => "1.000015";
};
on 'test' => sub {
requires "Cache::FastMmap" => "1.52";
requires "File::Spec" => "0";
requires "HTTP::Request::Common" => "0";
lib/Plack/Middleware/Greylist.pm view on Meta::CPAN
package Plack::Middleware::Greylist;
# ABSTRACT: throttle requests with different rates based on net blocks
# RECOMMEND PREREQ: Cache::FastMmap 1.52
# RECOMMEND PREREQ: Ref::Util::XS
use v5.20;
use warnings;
use parent qw( Plack::Middleware );
use HTTP::Status qw/ HTTP_FORBIDDEN HTTP_TOO_MANY_REQUESTS /;
use List::Util 1.29 qw/ pairs /;
use Module::Load qw/ load /;
use Net::IP::LPM;
use Plack::Util;
use Plack::Util::Accessor qw/ default_rate rules cache file _match greylist retry_after cache_config callback /;
use Ref::Util qw/ is_plain_arrayref is_coderef /;
use Time::Seconds qw/ ONE_MINUTE /;
use experimental qw/ postderef signatures /;
our $VERSION = 'v0.8.2';
sub prepare_app($self) {
$self->default_rate(-1) unless defined $self->default_rate;
t/00-report-prereqs.dd view on Meta::CPAN
'Test::TrailingSpace' => '0.0203',
'Test::Vars' => '0',
'Test::Version' => '1',
'strict' => '0'
}
},
'runtime' => {
'recommends' => {
'Cache::FastMmap' => '1.52',
'Net::IP::LPM' => '1.11',
'Ref::Util::XS' => '0'
},
'requires' => {
'HTTP::Status' => '0',
'List::Util' => '1.29',
'Module::Load' => '0',
'Net::IP::LPM' => '0',
'Plack::Middleware' => '0',
'Ref::Util' => '0',
'Time::Seconds' => '0',
'experimental' => '0',
'parent' => '0',
'perl' => 'v5.20.0',
'warnings' => '0'
}
},
'test' => {
'recommends' => {
'CPAN::Meta' => '2.120900'
( run in 0.781 second using v1.01-cache-2.11-cpan-a49fcb8fa48 )