Plack-Middleware-Security-Simple

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Test::Portability::Files" : "0",
            "Test::Spelling" : "0.17",
            "Test::TrailingSpace" : "0.0203",
            "Test::Vars" : "0",
            "Test::Version" : "1",
            "strict" : "0"
         }
      },
      "runtime" : {
         "recommends" : {
            "Ref::Util::XS" : "0"
         },
         "requires" : {
            "Exporter::Tiny" : "0",
            "HTTP::Status" : "0",
            "Hash::Match" : "0",
            "Plack::Middleware" : "0",
            "Plack::Response" : "0",
            "Plack::Util::Accessor" : "0",
            "Ref::Util" : "0",
            "Regexp::Common" : "0",
            "parent" : "0",
            "perl" : "v5.14.0",
            "warnings" : "0"
         }
      },
      "test" : {
         "recommends" : {
            "CPAN::Meta" : "2.120900"
         },

META.yml  view on Meta::CPAN

  version: '1.4'
name: Plack-Middleware-Security-Simple
provides:
  Plack::Middleware::Security::Common:
    file: lib/Plack/Middleware/Security/Common.pm
    version: v0.13.1
  Plack::Middleware::Security::Simple:
    file: lib/Plack/Middleware/Security/Simple.pm
    version: v0.13.1
recommends:
  Ref::Util::XS: '0'
requires:
  Exporter::Tiny: '0'
  HTTP::Status: '0'
  Hash::Match: '0'
  Plack::Middleware: '0'
  Plack::Response: '0'
  Plack::Util::Accessor: '0'
  Ref::Util: '0'
  Regexp::Common: '0'
  parent: '0'
  perl: v5.14.0
  warnings: '0'
resources:
  bugtracker: https://github.com/robrwo/Plack-Middleware-Security-Simple/issues
  repository: git://github.com/robrwo/Plack-Middleware-Security-Simple.git
version: v0.13.1
x_authority: cpan:RRWO
x_generated_by_perl: v5.42.1

Makefile.PL  view on Meta::CPAN

  "LICENSE" => "artistic_2",
  "MIN_PERL_VERSION" => "5.014000",
  "NAME" => "Plack::Middleware::Security::Simple",
  "PREREQ_PM" => {
    "Exporter::Tiny" => 0,
    "HTTP::Status" => 0,
    "Hash::Match" => 0,
    "Plack::Middleware" => 0,
    "Plack::Response" => 0,
    "Plack::Util::Accessor" => 0,
    "Ref::Util" => 0,
    "Regexp::Common" => 0,
    "parent" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "File::Spec" => 0,
    "HTTP::Exception" => 0,
    "HTTP::Request::Common" => 0,
    "IO::Handle" => 0,
    "IPC::Open3" => 0,

Makefile.PL  view on Meta::CPAN

  "IO::Handle" => 0,
  "IPC::Open3" => 0,
  "Log::Dispatch" => "2.68",
  "Log::Dispatch::Array" => 0,
  "Module::Metadata" => "1.000015",
  "Plack::Builder" => 0,
  "Plack::Middleware" => 0,
  "Plack::Response" => 0,
  "Plack::Test" => 0,
  "Plack::Util::Accessor" => 0,
  "Ref::Util" => 0,
  "Regexp::Common" => 0,
  "Test2::V0" => 0,
  "Test::More" => 0,
  "Test::Vars" => "0.015",
  "parent" => 0,
  "strict" => 0,
  "warnings" => 0
);


README.md  view on Meta::CPAN

# REQUIREMENTS

This module lists the following modules as runtime dependencies:

- [Exporter::Tiny](https://metacpan.org/pod/Exporter%3A%3ATiny)
- [HTTP::Status](https://metacpan.org/pod/HTTP%3A%3AStatus)
- [Hash::Match](https://metacpan.org/pod/Hash%3A%3AMatch)
- [Plack::Middleware](https://metacpan.org/pod/Plack%3A%3AMiddleware)
- [Plack::Response](https://metacpan.org/pod/Plack%3A%3AResponse)
- [Plack::Util::Accessor](https://metacpan.org/pod/Plack%3A%3AUtil%3A%3AAccessor)
- [Ref::Util](https://metacpan.org/pod/Ref%3A%3AUtil)
- [Regexp::Common](https://metacpan.org/pod/Regexp%3A%3ACommon)
- [parent](https://metacpan.org/pod/parent)
- [perl](https://metacpan.org/pod/perl) version v5.14.0 or later
- [warnings](https://metacpan.org/pod/warnings)

See the `cpanfile` file for the full list of prerequisites.

# INSTALLATION

The latest version of this module (along with any dependencies) can be installed from [CPAN](https://www.cpan.org) with the `cpan` tool that is included with Perl:

cpanfile  view on Meta::CPAN

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

requires "Exporter::Tiny" => "0";
requires "HTTP::Status" => "0";
requires "Hash::Match" => "0";
requires "Plack::Middleware" => "0";
requires "Plack::Response" => "0";
requires "Plack::Util::Accessor" => "0";
requires "Ref::Util" => "0";
requires "Regexp::Common" => "0";
requires "parent" => "0";
requires "perl" => "v5.14.0";
requires "warnings" => "0";
recommends "Ref::Util::XS" => "0";

on 'build' => sub {
  requires "ExtUtils::MakeMaker" => "7.22";
  requires "Module::Metadata" => "1.000015";
};

on 'test' => sub {
  requires "File::Spec" => "0";
  requires "HTTP::Exception" => "0";
  requires "HTTP::Request::Common" => "0";

lib/Plack/Middleware/Security/Simple.pm  view on Meta::CPAN

# ABSTRACT: A simple security filter for Plack

use v5.14;

use warnings;

use parent qw( Plack::Middleware );

use Hash::Match;
use HTTP::Status qw( HTTP_BAD_REQUEST );
use Ref::Util qw/ is_plain_arrayref is_plain_hashref /;

use Plack::Response;
use Plack::Util::Accessor qw( rules handler status );

# RECOMMEND PREREQ: Ref::Util::XS

our $VERSION = 'v0.13.1';


sub prepare_app {
    my ($self) = @_;

    if (my $rules = $self->rules) {

        if ( is_plain_arrayref($rules) || is_plain_hashref($rules) ) {

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

                                      'Test::Portability::Files' => '0',
                                      'Test::Spelling' => '0.17',
                                      'Test::TrailingSpace' => '0.0203',
                                      'Test::Vars' => '0',
                                      'Test::Version' => '1',
                                      'strict' => '0'
                                    }
                    },
       'runtime' => {
                      'recommends' => {
                                        'Ref::Util::XS' => '0'
                                      },
                      'requires' => {
                                      'Exporter::Tiny' => '0',
                                      'HTTP::Status' => '0',
                                      'Hash::Match' => '0',
                                      'Plack::Middleware' => '0',
                                      'Plack::Response' => '0',
                                      'Plack::Util::Accessor' => '0',
                                      'Ref::Util' => '0',
                                      'Regexp::Common' => '0',
                                      'parent' => '0',
                                      'perl' => 'v5.14.0',
                                      'warnings' => '0'
                                    }
                    },
       'test' => {
                   'recommends' => {
                                     'CPAN::Meta' => '2.120900'
                                   },



( run in 2.333 seconds using v1.01-cache-2.11-cpan-fe3c2283af0 )