App-Cerberus
view release on metacpan or search on metacpan
"requires" : {
"Test::More" : "0",
"Test::NoTabs" : "0",
"Test::Pod" : "1.41"
}
},
"runtime" : {
"requires" : {
"Cache::Memcached::Fast" : "0",
"Carp" : "0",
"DateTime" : "0",
"DateTime::TimeZone::Tzfile" : "0",
"File::Spec::Functions" : "0",
"FindBin" : "0",
"Geo::IP" : "0",
"HTTP::BrowserDetect" : "0",
"JSON" : "0",
"List::Util" : "0",
"Net::IP::Match::Regexp" : "0",
"Plack::Request" : "0",
"Plack::Runner" : "0",
"Pod::Usage" : "0",
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142060'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: App-Cerberus
requires:
Cache::Memcached::Fast: '0'
Carp: '0'
DateTime: '0'
DateTime::TimeZone::Tzfile: '0'
File::Spec::Functions: '0'
FindBin: '0'
Geo::IP: '0'
HTTP::BrowserDetect: '0'
JSON: '0'
List::Util: '0'
Net::IP::Match::Regexp: '0'
Plack::Request: '0'
Plack::Runner: '0'
Pod::Usage: '0'
Makefile.PL view on Meta::CPAN
},
"DISTNAME" => "App-Cerberus",
"EXE_FILES" => [
"bin/cerberus.pl"
],
"LICENSE" => "perl",
"NAME" => "App::Cerberus",
"PREREQ_PM" => {
"Cache::Memcached::Fast" => 0,
"Carp" => 0,
"DateTime" => 0,
"DateTime::TimeZone::Tzfile" => 0,
"File::Spec::Functions" => 0,
"FindBin" => 0,
"Geo::IP" => 0,
"HTTP::BrowserDetect" => 0,
"JSON" => 0,
"List::Util" => 0,
"Net::IP::Match::Regexp" => 0,
"Plack::Request" => 0,
"Plack::Runner" => 0,
"Pod::Usage" => 0,
Makefile.PL view on Meta::CPAN
"VERSION" => "0.11",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Cache::Memcached::Fast" => 0,
"Carp" => 0,
"DateTime" => 0,
"DateTime::TimeZone::Tzfile" => 0,
"File::Spec::Functions" => 0,
"FindBin" => 0,
"Geo::IP" => 0,
"HTTP::BrowserDetect" => 0,
"JSON" => 0,
"List::Util" => 0,
"Net::IP::Match::Regexp" => 0,
"Plack::Request" => 0,
"Plack::Runner" => 0,
"Pod::Usage" => 0,
lib/App/Cerberus/Plugin/Throttle.pm view on Meta::CPAN
package App::Cerberus::Plugin::Throttle;
$App::Cerberus::Plugin::Throttle::VERSION = '0.11';
use strict;
use warnings;
use Carp;
use parent 'App::Cerberus::Plugin';
use Net::IP::Match::Regexp qw(create_iprange_regexp_depthfirst match_ip);
use DateTime();
my %Periods = (
second => 5,
minute => 4,
hour => 3,
day => 2,
month => 1
);
my %Expire = (
lib/App/Cerberus/Plugin/TimeZone.pm view on Meta::CPAN
package App::Cerberus::Plugin::TimeZone;
$App::Cerberus::Plugin::TimeZone::VERSION = '0.11';
use strict;
use warnings;
use Time::OlsonTZ::Data qw(olson_tzfile);
use DateTime();
use DateTime::TimeZone::Tzfile();
use Carp;
use parent 'App::Cerberus::Plugin';
#===================================
sub request {
#===================================
my ( $self, $req, $response ) = @_;
my $tz_name = $response->{tz}{name} or return;
my $now = DateTime->now( time_zone => 'UTC' );
my $tz_file = eval { olson_tzfile($tz_name) };
my $tz = DateTime::TimeZone::Tzfile->new($tz_file);
$response->{tz}{gmt_offset} = $tz->offset_for_datetime($now);
$response->{tz}{dst} = $tz->is_dst_for_datetime($now);
$response->{tz}{short_name} = $tz->short_name_for_datetime($now);
}
1;
# ABSTRACT: Add time-zone information to App::Cerberus
( run in 0.416 second using v1.01-cache-2.11-cpan-05444aca049 )