[libweb-simple-perl] 01/04: Imported Upstream version 0.028
gregor herrmann
gregoa at debian.org
Sat Jul 12 19:19:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libweb-simple-perl.
commit 07ef229b14b7bd457f36d19d84b694e53d732e9a
Author: gregor herrmann <gregoa at debian.org>
Date: Sat Jul 12 21:10:34 2014 +0200
Imported Upstream version 0.028
---
Changes | 18 ++++++++
MANIFEST | 1 +
META.json | 38 +++++++++++++----
META.yml | 18 +++++---
Makefile.PL | 91 +++++++++++++++++++++++++++++++++++++----
lib/Web/Dispatch.pm | 2 +-
lib/Web/Dispatch/HTTPMethods.pm | 2 +-
lib/Web/Dispatch/Predicates.pm | 2 +-
lib/Web/Dispatch/Upload.pm | 3 +-
lib/Web/Simple.pm | 3 +-
lib/Web/Simple/Role.pm | 3 +-
t/dispatch_misc.t | 3 +-
t/leak.t | 16 ++++++++
13 files changed, 169 insertions(+), 31 deletions(-)
diff --git a/Changes b/Changes
index 54613fe..1c2e92e 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,23 @@
Revision history for Web-Simple
+0.028 - 2014-07-11
+ - remove use of 'use base'
+ - lower minimum required version of perl properly down to 5.6
+
+0.027 - 2014-07-11
+ - stable release of 0.026_001
+
+0.026_001 - 2014-07-09
+ - fix prerequisite declarations on older toolchain
+
+0.026 - 2014-07-09
+ - remove erroneous XML::Tags prereq
+
+0.025 - 2014-07-07
+ - fixes a memory leak that occurs when calling
+ Web::Simple::Application::to_psgi_app (Christian Walde)
+ - more complete prerequisite declarations
+
0.024 - 2014-07-03
- small documentation fixes
diff --git a/MANIFEST b/MANIFEST
index 816a44a..36dc36f 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -37,6 +37,7 @@ t/dispatch_parser.t
t/env.t
t/globbery/one
t/globbery/two
+t/leak.t
t/match-home.t
t/param_parser.t
t/post.t
diff --git a/META.json b/META.json
index 59835fb..3d434ab 100644
--- a/META.json
+++ b/META.json
@@ -3,7 +3,7 @@
"author" : [
"mst - Matt S. Trout (cpan:MSTROUT) <mst at shadowcat.co.uk>"
],
- "dynamic_config" : 1,
+ "dynamic_config" : 0,
"generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141520",
"license" : [
"perl_5"
@@ -20,11 +20,6 @@
]
},
"prereqs" : {
- "build" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- }
- },
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
@@ -32,14 +27,39 @@
},
"runtime" : {
"requires" : {
- "Data::Dumper::Concise" : "2.020",
+ "Encode" : "0",
+ "Exporter" : "5.57",
"Moo" : "0.009014",
"Plack" : "0.9968",
+ "Scalar::Util" : "0",
"Syntax::Keyword::Gather" : "1.001",
- "warnings::illegalproto" : "0.001"
+ "perl" : "5.006",
+ "strictures" : "1",
+ "warnings::illegalproto" : "0"
+ }
+ },
+ "test" : {
+ "recommends" : {
+ "Devel::Cycle" : "0",
+ "HTTP::Request::AsCGI" : "0"
+ },
+ "requires" : {
+ "Data::Dumper::Concise" : "2.020",
+ "Test::More" : "0.88"
}
}
},
"release_status" : "stable",
- "version" : "0.024"
+ "resources" : {
+ "bugtracker" : {
+ "mailto" : "bug-Web-Simple at rt.cpan.org",
+ "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Web-Simple"
+ },
+ "repository" : {
+ "type" : "git",
+ "url" : "git://git.shadowcat.co.uk/p5sagit/Web-Simple.git",
+ "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Web-Simple.git"
+ }
+ },
+ "version" : "0.028"
}
diff --git a/META.yml b/META.yml
index 812d205..bdc4625 100644
--- a/META.yml
+++ b/META.yml
@@ -3,10 +3,11 @@ abstract: 'A quick and easy way to build simple web applications'
author:
- 'mst - Matt S. Trout (cpan:MSTROUT) <mst at shadowcat.co.uk>'
build_requires:
- ExtUtils::MakeMaker: '0'
+ Data::Dumper::Concise: '2.020'
+ Test::More: '0.88'
configure_requires:
ExtUtils::MakeMaker: '0'
-dynamic_config: 1
+dynamic_config: 0
generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141520'
license: perl
meta-spec:
@@ -18,9 +19,16 @@ no_index:
- t
- inc
requires:
- Data::Dumper::Concise: '2.020'
+ Encode: '0'
+ Exporter: '5.57'
Moo: '0.009014'
Plack: '0.9968'
+ Scalar::Util: '0'
Syntax::Keyword::Gather: '1.001'
- warnings::illegalproto: '0.001'
-version: '0.024'
+ perl: '5.006'
+ strictures: '1'
+ warnings::illegalproto: '0'
+resources:
+ bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Web-Simple
+ repository: git://git.shadowcat.co.uk/p5sagit/Web-Simple.git
+version: '0.028'
diff --git a/Makefile.PL b/Makefile.PL
index bf0cba0..47def6d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,19 +1,94 @@
use strict;
use warnings FATAL => 'all';
-use 5.008001;
+use 5.006;
use ExtUtils::MakeMaker;
(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
-WriteMakefile(
+my %WriteMakefileArgs = (
NAME => 'Web::Simple',
VERSION_FROM => 'lib/Web/Simple.pm',
- PREREQ_PM => {
- 'Syntax::Keyword::Gather' => '1.001',
- 'Plack' => '0.9968',
- 'Moo' => '0.009014',
- 'warnings::illegalproto' => '0.001',
- 'Data::Dumper::Concise' => '2.020',
+
+ META_MERGE => {
+ 'meta-spec' => { version => 2 },
+ dynamic_config => 0,
+ resources => {
+ # r/w: p5sagit at git.shadowcat.co.uk:Web-Simple.git
+ repository => {
+ url => 'git://git.shadowcat.co.uk/p5sagit/Web-Simple.git',
+ web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Web-Simple.git',
+ type => 'git',
+ },
+ bugtracker => {
+ mailto => 'bug-Web-Simple at rt.cpan.org',
+ web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Web-Simple',
+ },
+ },
+ },
+
+ META_ADD => {
+ prereqs => {
+ configure => {
+ requires => {
+ 'ExtUtils::MakeMaker' => 0,
+ },
+ },
+ runtime => {
+ requires => {
+ 'Encode' => '0', # not core in 5.6
+ 'Exporter' => '5.57', # use Exporter 'import'
+ 'Moo' => '0.009014',
+ 'Plack' => '0.9968',
+ 'Scalar::Util' => '0', # not core in 5.6
+ 'Syntax::Keyword::Gather' => '1.001',
+ 'strictures' => '1',
+ 'warnings::illegalproto' => '0',
+ 'perl' => '5.006',
+ },
+ },
+ test => {
+ requires => {
+ 'Data::Dumper::Concise' => '2.020',
+ 'Test::More' => '0.88',
+ },
+ recommends => {
+ 'Devel::Cycle' => '0',
+ 'HTTP::Request::AsCGI' => '0',
+ },
+ },
+ },
},
realclean => { FILES => [ 'Distar/', 'MANIFEST*' ] },
);
+
+my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
+
+for (qw(configure build test runtime)) {
+ my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
+ next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_}
+ or exists $WriteMakefileArgs{$key};
+ my $r = $WriteMakefileArgs{$key} = {
+ %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}},
+ %{delete $WriteMakefileArgs{$key} || {}},
+ };
+ defined $r->{$_} or delete $r->{$_} for keys %$r;
+}
+
+# dynamic prereqs get added here.
+
+$WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0;
+
+$WriteMakefileArgs{BUILD_REQUIRES} = {
+ %{$WriteMakefileArgs{BUILD_REQUIRES} || {}},
+ %{delete $WriteMakefileArgs{TEST_REQUIRES}}
+} if $eumm_version < 6.63_03;
+
+$WriteMakefileArgs{PREREQ_PM} = {
+ %{$WriteMakefileArgs{PREREQ_PM}},
+ %{delete $WriteMakefileArgs{BUILD_REQUIRES}}
+} if $eumm_version < 6.55_01;
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+ if $eumm_version < 6.51_03;
+
+WriteMakefile(%WriteMakefileArgs);
diff --git a/lib/Web/Dispatch.pm b/lib/Web/Dispatch.pm
index 2a5a835..d34fe6e 100644
--- a/lib/Web/Dispatch.pm
+++ b/lib/Web/Dispatch.pm
@@ -14,7 +14,7 @@ with 'Web::Dispatch::ToApp';
has dispatch_app => (
is => 'lazy', builder => sub { shift->dispatch_object->to_app }
);
-has dispatch_object => (is => 'ro', required => 0);
+has dispatch_object => (is => 'ro', required => 0, weak_ref => 1);
has parser_class => (
is => 'ro', default => quote_sub q{ 'Web::Dispatch::Parser' }
);
diff --git a/lib/Web/Dispatch/HTTPMethods.pm b/lib/Web/Dispatch/HTTPMethods.pm
index c78c650..5a73e5e 100644
--- a/lib/Web/Dispatch/HTTPMethods.pm
+++ b/lib/Web/Dispatch/HTTPMethods.pm
@@ -3,7 +3,7 @@ package Web::Dispatch::HTTPMethods;
use strictures 1;
use Web::Dispatch::Predicates qw(match_method);
use Scalar::Util qw(blessed);
-use base qw(Exporter);
+use Exporter 'import';
our @EXPORT = qw(GET HEAD POST PUT DELETE OPTIONS);
diff --git a/lib/Web/Dispatch/Predicates.pm b/lib/Web/Dispatch/Predicates.pm
index ab44055..3913a0b 100644
--- a/lib/Web/Dispatch/Predicates.pm
+++ b/lib/Web/Dispatch/Predicates.pm
@@ -1,7 +1,7 @@
package Web::Dispatch::Predicates;
use strictures 1;
-use base qw(Exporter);
+use Exporter 'import';
our @EXPORT = qw(
match_and match_or match_not match_method match_path match_path_strip
diff --git a/lib/Web/Dispatch/Upload.pm b/lib/Web/Dispatch/Upload.pm
index 8e5fdc6..fa01aa5 100644
--- a/lib/Web/Dispatch/Upload.pm
+++ b/lib/Web/Dispatch/Upload.pm
@@ -2,7 +2,8 @@ use strictures 1;
{
package Web::Dispatch::Upload;
- use base qw(Plack::Request::Upload);
+ require Plack::Request::Upload;
+ our @ISA = qw(Plack::Request::Upload);
use overload '""' => 'tempname', fallback => 1;
sub is_upload { 1 }
diff --git a/lib/Web/Simple.pm b/lib/Web/Simple.pm
index 1a6fc35..1116d51 100644
--- a/lib/Web/Simple.pm
+++ b/lib/Web/Simple.pm
@@ -1,12 +1,11 @@
package Web::Simple;
use strictures 1;
-use 5.008;
use warnings::illegalproto ();
use Moo ();
use Web::Dispatch::Wrapper ();
-our $VERSION = '0.024';
+our $VERSION = '0.028';
sub import {
my ($class, $app_package) = @_;
diff --git a/lib/Web/Simple/Role.pm b/lib/Web/Simple/Role.pm
index 152c488..ac2ff81 100644
--- a/lib/Web/Simple/Role.pm
+++ b/lib/Web/Simple/Role.pm
@@ -1,10 +1,9 @@
package Web::Simple::Role;
use strictures 1;
-use 5.008;
use warnings::illegalproto ();
use Moo::Role ();
-our $VERSION = '0.024';
+our $VERSION = '0.028';
sub import {
my ($class, $app_package) = @_;
diff --git a/t/dispatch_misc.t b/t/dispatch_misc.t
index 05bdd67..842cf52 100644
--- a/t/dispatch_misc.t
+++ b/t/dispatch_misc.t
@@ -64,7 +64,8 @@ sub app_is_object {
sub to_app { [ 999, [], ["ok"] ] }
}
- my $d = Web::Dispatch->new( dispatch_object => ObjectApp->new );
+ my $o = ObjectApp->new;
+ my $d = Web::Dispatch->new( dispatch_object => $o );
my $res = $d->call;
cmp_ok $res->[0], '==', 999, "Web::Dispatch can dispatch properly, given only an object with to_app method";
diff --git a/t/leak.t b/t/leak.t
new file mode 100644
index 0000000..4976f6b
--- /dev/null
+++ b/t/leak.t
@@ -0,0 +1,16 @@
+use strictures;
+use Test::More;
+
+plan skip_all => 'No Devel::Cycle' unless eval { require Devel::Cycle; 1 };
+
+use Web::Simple;
+
+my $counter;
+my $on_cycle = sub { Devel::Cycle::_do_report( ++$counter, shift ) };
+{
+ local *STDOUT = *STDERR;
+ Devel::Cycle::find_cycle( main->new->to_psgi_app, $on_cycle );
+}
+ok !$counter, "no leak in to_psgi_app";
+
+done_testing;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libweb-simple-perl.git
More information about the Pkg-perl-cvs-commits
mailing list