Catalyst-Plugin-DetachIfNotModified

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Test::Pod" : "1.41",
            "Test::Pod::Coverage" : "1.08",
            "Test::Pod::LinkCheck" : "0",
            "Test::Portability::Files" : "0",
            "Test::TrailingSpace" : "0.0203"
         }
      },
      "runtime" : {
         "recommends" : {
            "Plack::Middleware::ConditionalGET" : "0",
            "Ref::Util::XS" : "0"
         },
         "requires" : {
            "Catalyst" : "5.90018",
            "HTTP::Headers" : "5.18",
            "HTTP::Status" : "0",
            "List::Util" : "0",
            "Moose::Role" : "0",
            "Ref::Util" : "0",
            "namespace::autoclean" : "0",
            "perl" : "v5.14.0"
         }
      },
      "test" : {
         "recommends" : {
            "CPAN::Meta" : "2.120900"
         },
         "requires" : {
            "Catalyst" : "5.90018",

META.yml  view on Meta::CPAN

meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Catalyst-Plugin-DetachIfNotModified
provides:
  Catalyst::Plugin::DetachIfNotModified:
    file: lib/Catalyst/Plugin/DetachIfNotModified.pm
    version: v0.3.1
recommends:
  Plack::Middleware::ConditionalGET: '0'
  Ref::Util::XS: '0'
requires:
  Catalyst: '5.90018'
  HTTP::Headers: '5.18'
  HTTP::Status: '0'
  List::Util: '0'
  Moose::Role: '0'
  Ref::Util: '0'
  namespace::autoclean: '0'
  perl: v5.14.0
resources:
  bugtracker: https://github.com/robrwo/Catalyst-Plugin-DetachIfNotModified/issues
  repository: git://github.com/robrwo/Catalyst-Plugin-DetachIfNotModified.git
version: v0.3.1
x_authority: cpan:RRWO
x_generated_by_perl: v5.34.0
x_serialization_backend: 'YAML::Tiny version 1.74'
x_spdx_expression: Artistic-2.0

Makefile.PL  view on Meta::CPAN

  "DISTNAME" => "Catalyst-Plugin-DetachIfNotModified",
  "LICENSE" => "artistic_2",
  "MIN_PERL_VERSION" => "5.014000",
  "NAME" => "Catalyst::Plugin::DetachIfNotModified",
  "PREREQ_PM" => {
    "Catalyst" => "5.90018",
    "HTTP::Headers" => "5.18",
    "HTTP::Status" => 0,
    "List::Util" => 0,
    "Moose::Role" => 0,
    "Ref::Util" => 0,
    "namespace::autoclean" => 0
  },
  "TEST_REQUIRES" => {
    "Catalyst" => "5.90018",
    "Catalyst::Controller" => 0,
    "Catalyst::Test" => 0,
    "File::Spec" => 0,
    "HTTP::Date" => 0,
    "HTTP::Request::Common" => 0,
    "Module::Metadata" => 0,

Makefile.PL  view on Meta::CPAN

  "File::Spec" => 0,
  "HTTP::Date" => 0,
  "HTTP::Headers" => "5.18",
  "HTTP::Request::Common" => 0,
  "HTTP::Status" => 0,
  "List::Util" => 0,
  "Module::Metadata" => 0,
  "Moose" => 0,
  "Moose::Role" => 0,
  "Plack::Middleware::MethodOverride" => 0,
  "Ref::Util" => 0,
  "Term::Size::Any" => 0,
  "Test::Log::Dispatch" => 0,
  "Test::More" => 0,
  "Test::Most" => 0,
  "Time::Seconds" => 0,
  "lib" => 0,
  "namespace::autoclean" => 0,
  "strict" => 0,
  "warnings" => 0
);

cpanfile  view on Meta::CPAN

# This file is generated by Dist::Zilla::Plugin::CPANFile v6.030
# Do not edit this file directly. To change prereqs, edit the `dist.ini` file.

requires "Catalyst" => "5.90018";
requires "HTTP::Headers" => "5.18";
requires "HTTP::Status" => "0";
requires "List::Util" => "0";
requires "Moose::Role" => "0";
requires "Ref::Util" => "0";
requires "namespace::autoclean" => "0";
requires "perl" => "v5.14.0";
recommends "Plack::Middleware::ConditionalGET" => "0";
recommends "Ref::Util::XS" => "0";

on 'test' => sub {
  requires "Catalyst" => "5.90018";
  requires "Catalyst::Controller" => "0";
  requires "Catalyst::Test" => "0";
  requires "File::Spec" => "0";
  requires "HTTP::Date" => "0";
  requires "HTTP::Request::Common" => "0";
  requires "Module::Metadata" => "0";
  requires "Moose" => "0";

lib/Catalyst/Plugin/DetachIfNotModified.pm  view on Meta::CPAN


use v5.14;

# ABSTRACT: Short-circuit requests with If-Modified-Since headers

use Moose::Role;

use HTTP::Headers 5.18;
use HTTP::Status qw/ HTTP_NOT_MODIFIED /;
use List::Util qw/ max /;
use Ref::Util qw/ is_blessed_ref /;

# RECOMMEND PREREQ: Plack::Middleware::ConditionalGET
# RECOMMEND PREREQ: Ref::Util::XS

use namespace::autoclean;

our $VERSION = 'v0.3.1';


sub detach_if_not_modified_since {
    my ($c, @times) = @_;

    my @epochs = grep defined, map { is_blessed_ref($_) ? $_->epoch : $_ } @times;

t/00-report-prereqs.dd  view on Meta::CPAN

                                      'Test::Pod' => '1.41',
                                      'Test::Pod::Coverage' => '1.08',
                                      'Test::Pod::LinkCheck' => '0',
                                      'Test::Portability::Files' => '0',
                                      'Test::TrailingSpace' => '0.0203'
                                    }
                    },
       'runtime' => {
                      'recommends' => {
                                        'Plack::Middleware::ConditionalGET' => '0',
                                        'Ref::Util::XS' => '0'
                                      },
                      'requires' => {
                                      'Catalyst' => '5.90018',
                                      'HTTP::Headers' => '5.18',
                                      'HTTP::Status' => '0',
                                      'List::Util' => '0',
                                      'Moose::Role' => '0',
                                      'Ref::Util' => '0',
                                      'namespace::autoclean' => '0',
                                      'perl' => 'v5.14.0'
                                    }
                    },
       'test' => {
                   'recommends' => {
                                     'CPAN::Meta' => '2.120900'
                                   },
                   'requires' => {
                                   'Catalyst' => '5.90018',



( run in 0.504 second using v1.01-cache-2.11-cpan-a5abf4f5562 )