Hello community, here is the log from the commit of package perl-Capture-Tiny for openSUSE:Factory checked in at 2014-02-12 17:22:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Capture-Tiny (Old) and /work/SRC/openSUSE:Factory/.perl-Capture-Tiny.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Capture-Tiny" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Capture-Tiny/perl-Capture-Tiny.changes 2013-11-26 19:24:12.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Capture-Tiny.new/perl-Capture-Tiny.changes 2014-02-12 17:22:54.000000000 +0100 @@ -1,0 +2,8 @@ +Sun Feb 9 13:33:36 UTC 2014 - [email protected] + +- updated to 0.24 + Fixed: + - Closed security hole in use of semaphore flag in /tmp; + now opens semaphore the using O_CREAT|O_EXCL + +------------------------------------------------------------------- Old: ---- Capture-Tiny-0.23.tar.gz New: ---- Capture-Tiny-0.24.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Capture-Tiny.spec ++++++ --- /var/tmp/diff_new_pack.wlI9AL/_old 2014-02-12 17:22:54.000000000 +0100 +++ /var/tmp/diff_new_pack.wlI9AL/_new 2014-02-12 17:22:54.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-Capture-Tiny # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: perl-Capture-Tiny -Version: 0.23 +Version: 0.24 Release: 0 %define cpan_name Capture-Tiny Summary: Capture STDOUT and STDERR from Perl, XS or external programs @@ -29,15 +29,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -#BuildRequires: perl(Capture::Tiny) -#BuildRequires: perl(Cases) -#BuildRequires: perl(Inline) -#BuildRequires: perl(Pod::Wordlist) -#BuildRequires: perl(Test::Differences) -#BuildRequires: perl(Test::Spelling) >= 0.12 -#BuildRequires: perl(TieEvil) -#BuildRequires: perl(TieLC) -#BuildRequires: perl(Utils) +BuildRequires: perl(version) %{perl_requires} %description ++++++ Capture-Tiny-0.23.tar.gz -> Capture-Tiny-0.24.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/CONTRIBUTING new/Capture-Tiny-0.24/CONTRIBUTING --- old/Capture-Tiny-0.23/CONTRIBUTING 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/CONTRIBUTING 2014-02-06 23:15:44.000000000 +0100 @@ -4,8 +4,12 @@ contains instructions that will help you work with the source code. The distribution is managed with Dist::Zilla. This means than many of the -usual files you might expect are not in the repository, but are generated -at release time (e.g. Makefile.PL). +usual files you might expect are not in the repository, but are generated at +release time (e.g. Makefile.PL). + +Generally, **you do not need Dist::Zilla to contribute patches**. You do need +Dist::Zilla to create a tarball and/or install from the repository. See below +for guidance. ### Getting dependencies @@ -27,8 +31,8 @@ $ prove -l $ prove -lv t/some_test_file.t -For most distributions, `prove` is entirely sufficent for you to test any -patches you have. +For most of my distributions, `prove` is entirely sufficient for you to test any +patches you have. I use `prove` for 99% of my testing during development. ### Code style and tidying @@ -40,9 +44,9 @@ ### Patching documentation -Much of the documentation Pod is generated at release time. -Depending on the distribution, some documentation may be written in a Pod -dialect called WikiDoc. (See Pod::WikiDoc on CPAN.) +Much of the documentation Pod is generated at release time. Depending on the +distribution, some of my documentation may be written in a Pod dialect called +WikiDoc. (See Pod::WikiDoc on CPAN.) If you would like to submit a documentation edit, please limit yourself to the documentation you see. @@ -50,12 +54,34 @@ If you see typos or documentation issues in the generated docs, please email or open a bug ticket instead of patching. -### Learning Dist::Zilla +### Installing from the repository + +If you want to install directly from the repository, you need to have +Dist::Zilla installed (see below). If this is a burden to you, I welcome +patches against a CPAN tarball instead of the repository. + +### Installing and using Dist::Zilla + +Dist::Zilla is a very powerful authoring tool, optimized for maintaining a +large number of distributions with a high degree of automation, but it has a +large dependency chain, a bit of a learning curve and requires a number of +author-specific plugins. + +To install it from CPAN, I recommend one of the following approaches for +the quickest installation: -Dist::Zilla is a very powerful authoring tool, but requires a number of -author-specific plugins. If you would like to use it for contributing, -install it from CPAN, then run one of the following commands, depending on -your CPAN client: + # using CPAN.pm, but bypassing non-functional pod tests + $ cpan TAP::Harness::Restricted + $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla + + # using cpanm, bypassing *all* tests + $ cpanm -n Dist::Zilla + +In either case, it's probably going to take about 10 minutes. Go for a walk, +go get a cup of your favorite beverage, take a bathroom break, or whatever. +When you get back, Dist::Zilla should be ready for you. + +Then you need to install any plugins specific to this distribution: $ cpan `dzil authordeps` $ dzil authordeps | cpanm @@ -66,5 +92,9 @@ $ dzil test $ dzil xtest +To install from the repository, use: + + $ dzil install + You can learn more about Dist::Zilla at http://dzil.org/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/Changes new/Capture-Tiny-0.24/Changes --- old/Capture-Tiny-0.23/Changes 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/Changes 2014-02-06 23:15:44.000000000 +0100 @@ -1,5 +1,12 @@ Revision history for Capture-Tiny +0.24 2014-02-06 17:15:37-05:00 America/New_York + + Fixed: + + - Closed security hole in use of semaphore flag in /tmp; + now opens semaphore the using O_CREAT|O_EXCL + 0.23 2013-10-20 11:25:34 America/New_York Fixed: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/MANIFEST new/Capture-Tiny-0.24/MANIFEST --- old/Capture-Tiny-0.23/MANIFEST 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/MANIFEST 2014-02-06 23:15:44.000000000 +0100 @@ -1,3 +1,4 @@ +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.012. CONTRIBUTING Changes LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/META.json new/Capture-Tiny-0.24/META.json --- old/Capture-Tiny-0.23/META.json 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/META.json 2014-02-06 23:15:44.000000000 +0100 @@ -4,7 +4,7 @@ "David Golden <[email protected]>" ], "dynamic_config" : 1, - "generated_by" : "Dist::Zilla version 5.000, CPAN::Meta::Converter version 2.132830", + "generated_by" : "Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380", "license" : [ "apache_2_0" ], @@ -32,6 +32,11 @@ }, "develop" : { "requires" : { + "Dist::Zilla" : "5.012", + "Dist::Zilla::Plugin::OSPrereqs" : "0", + "Dist::Zilla::Plugin::Prereqs" : "0", + "Dist::Zilla::Plugin::RemovePrereqs" : "0", + "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.060", "File::Spec" : "0", "File::Temp" : "0", "IO::Handle" : "0", @@ -59,7 +64,7 @@ "test" : { "recommends" : { "CPAN::Meta" : "0", - "CPAN::Meta::Requirements" : "0", + "CPAN::Meta::Requirements" : "2.120900", "Inline" : "0.50" }, "requires" : { @@ -68,14 +73,15 @@ "IO::File" : "0", "List::Util" : "0", "Test::More" : "0.62", - "lib" : "0" + "lib" : "0", + "version" : "0" } } }, "provides" : { "Capture::Tiny" : { "file" : "lib/Capture/Tiny.pm", - "version" : "0.23" + "version" : "0.24" } }, "release_status" : "stable", @@ -90,7 +96,7 @@ "web" : "https://github.com/dagolden/Capture-Tiny" } }, - "version" : "0.23", + "version" : "0.24", "x_authority" : "cpan:DAGOLDEN", "x_contributors" : [ "Dagfinn Ilmari Manns\u00e5ker <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/META.yml new/Capture-Tiny-0.24/META.yml --- old/Capture-Tiny-0.23/META.yml 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/META.yml 2014-02-06 23:15:44.000000000 +0100 @@ -3,20 +3,21 @@ author: - 'David Golden <[email protected]>' build_requires: - ExtUtils::MakeMaker: 0 - File::Spec::Functions: 0 - IO::File: 0 - List::Util: 0 - Test::More: 0.62 - lib: 0 + ExtUtils::MakeMaker: '0' + File::Spec::Functions: '0' + IO::File: '0' + List::Util: '0' + Test::More: '0.62' + lib: '0' + version: '0' configure_requires: - ExtUtils::MakeMaker: 6.17 + ExtUtils::MakeMaker: '6.17' dynamic_config: 1 -generated_by: 'Dist::Zilla version 5.000, CPAN::Meta::Converter version 2.132830' +generated_by: 'Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380' license: apache meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: Capture-Tiny no_index: directory: @@ -29,22 +30,22 @@ provides: Capture::Tiny: file: lib/Capture/Tiny.pm - version: 0.23 + version: '0.24' requires: - Carp: 0 - Exporter: 0 - File::Spec: 0 - File::Temp: 0 - IO::Handle: 0 - Scalar::Util: 0 - perl: 5.006 - strict: 0 - warnings: 0 + Carp: '0' + Exporter: '0' + File::Spec: '0' + File::Temp: '0' + IO::Handle: '0' + Scalar::Util: '0' + perl: '5.006' + strict: '0' + warnings: '0' resources: bugtracker: https://github.com/dagolden/Capture-Tiny/issues homepage: https://github.com/dagolden/Capture-Tiny repository: https://github.com/dagolden/Capture-Tiny.git -version: 0.23 +version: '0.24' x_authority: cpan:DAGOLDEN x_contributors: - 'Dagfinn Ilmari Mannsåker <[email protected]>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/Makefile.PL new/Capture-Tiny-0.24/Makefile.PL --- old/Capture-Tiny-0.23/Makefile.PL 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/Makefile.PL 2014-02-06 23:15:44.000000000 +0100 @@ -1,4 +1,5 @@ +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.012. use strict; use warnings; @@ -35,39 +36,39 @@ "IO::File" => 0, "List::Util" => 0, "Test::More" => "0.62", - "lib" => 0 + "lib" => 0, + "version" => 0 }, - "VERSION" => "0.23", + "VERSION" => "0.24", "test" => { "TESTS" => "t/*.t" } ); -unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { - my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; - my $br = $WriteMakefileArgs{BUILD_REQUIRES}; - for my $mod ( keys %$tr ) { - if ( exists $br->{$mod} ) { - $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; - } - else { - $br->{$mod} = $tr->{$mod}; - } - } -} +my %FallbackPrereqs = ( + "Carp" => 0, + "Exporter" => 0, + "ExtUtils::MakeMaker" => 0, + "File::Spec" => 0, + "File::Spec::Functions" => 0, + "File::Temp" => 0, + "IO::File" => 0, + "IO::Handle" => 0, + "List::Util" => 0, + "Scalar::Util" => 0, + "Test::More" => "0.62", + "lib" => 0, + "strict" => 0, + "version" => 0, + "warnings" => 0 +); -unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { - my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; - my $pp = $WriteMakefileArgs{PREREQ_PM}; - for my $mod ( keys %$br ) { - if ( exists $pp->{$mod} ) { - $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; - } - else { - $pp->{$mod} = $br->{$mod}; - } - } + +unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { + delete $WriteMakefileArgs{TEST_REQUIRES}; + delete $WriteMakefileArgs{BUILD_REQUIRES}; + $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/README new/Capture-Tiny-0.24/README --- old/Capture-Tiny-0.23/README 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/README 2014-02-06 23:15:44.000000000 +0100 @@ -3,7 +3,7 @@ programs VERSION - version 0.23 + version 0.24 SYNOPSIS use Capture::Tiny ':all'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/cpanfile new/Capture-Tiny-0.24/cpanfile --- old/Capture-Tiny-0.23/cpanfile 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/cpanfile 2014-02-06 23:15:44.000000000 +0100 @@ -15,11 +15,12 @@ requires "List::Util" => "0"; requires "Test::More" => "0.62"; requires "lib" => "0"; + requires "version" => "0"; }; on 'test' => sub { recommends "CPAN::Meta" => "0"; - recommends "CPAN::Meta::Requirements" => "0"; + recommends "CPAN::Meta::Requirements" => "2.120900"; recommends "Inline" => "0.50"; }; @@ -28,6 +29,11 @@ }; on 'develop' => sub { + requires "Dist::Zilla" => "5.012"; + requires "Dist::Zilla::Plugin::OSPrereqs" => "0"; + requires "Dist::Zilla::Plugin::Prereqs" => "0"; + requires "Dist::Zilla::Plugin::RemovePrereqs" => "0"; + requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.060"; requires "File::Spec" => "0"; requires "File::Temp" => "0"; requires "IO::Handle" => "0"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/dist.ini new/Capture-Tiny-0.24/dist.ini --- old/Capture-Tiny-0.23/dist.ini 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/dist.ini 2014-02-06 23:15:44.000000000 +0100 @@ -5,7 +5,7 @@ copyright_year = 2009 [@DAGOLDEN] -:version = 0.056 +:version = 0.060 stopwords = UTF stopwords = seekable stopwords = prototyped diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/lib/Capture/Tiny.pm new/Capture-Tiny-0.24/lib/Capture/Tiny.pm --- old/Capture-Tiny-0.23/lib/Capture/Tiny.pm 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/lib/Capture/Tiny.pm 2014-02-06 23:15:44.000000000 +0100 @@ -3,7 +3,7 @@ use warnings; package Capture::Tiny; # ABSTRACT: Capture STDOUT and STDERR from Perl, XS or external programs -our $VERSION = '0.23'; # VERSION +our $VERSION = '0.24'; # VERSION use Carp (); use Exporter (); use IO::Handle (); @@ -63,11 +63,18 @@ # This is annoying, but seems to be the best that can be done # as a simple, portable IPC technique #--------------------------------------------------------------------------# -my @cmd = ($^X, '-C0', '-e', '$SIG{HUP}=sub{exit}; ' - . 'if( my $fn=shift ){ open my $fh, qq{>$fn}; print {$fh} $$; close $fh;} ' - . 'my $buf; while (sysread(STDIN, $buf, 2048)) { ' - . 'syswrite(STDOUT, $buf); syswrite(STDERR, $buf)}' -); +my @cmd = ($^X, '-C0', '-e', <<'HERE'); +use Fcntl; +$SIG{HUP}=sub{exit}; +if ( my $fn=shift ) { + sysopen(my $fh, qq{$fn}, O_WRONLY|O_CREAT|O_EXCL) or die $!; + print {$fh} $$; + close $fh; +} +my $buf; while (sysread(STDIN, $buf, 2048)) { + syswrite(STDOUT, $buf); syswrite(STDERR, $buf); +} +HERE #--------------------------------------------------------------------------# # filehandle manipulation @@ -413,7 +420,7 @@ =head1 VERSION -version 0.23 +version 0.24 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/perlcritic.rc new/Capture-Tiny-0.24/perlcritic.rc --- old/Capture-Tiny-0.23/perlcritic.rc 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/perlcritic.rc 2014-02-06 23:15:44.000000000 +0100 @@ -7,6 +7,9 @@ [TestingAndDebugging::ProhibitNoStrict] allow = refs +[Variables::ProhibitEvilVariables] +variables = $DB::single + # Turn these off [-BuiltinFunctions::ProhibitStringyEval] [-ControlStructures::ProhibitPostfixControls] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/t/00-report-prereqs.t new/Capture-Tiny-0.24/t/00-report-prereqs.t --- old/Capture-Tiny-0.23/t/00-report-prereqs.t 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/t/00-report-prereqs.t 2014-02-06 23:15:44.000000000 +0100 @@ -3,72 +3,131 @@ use strict; use warnings; -# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.010 +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.013 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec::Functions; use List::Util qw/max/; +use version; + +# hide optional CPAN::Meta modules from prereq scanner +# and check if they are available +my $cpan_meta = "CPAN::Meta"; +my $cpan_meta_req = "CPAN::Meta::Requirements"; +my $HAS_CPAN_META = eval "require $cpan_meta"; ## no critic +my $HAS_CPAN_META_REQ = eval "require $cpan_meta_req; $cpan_meta_req->VERSION('2.120900')"; + +# Verify requirements? +my $DO_VERIFY_PREREQS = 1; + +sub _merge_requires { + my ($collector, $prereqs) = @_; + for my $phase ( qw/configure build test runtime develop/ ) { + next unless exists $prereqs->{$phase}; + if ( my $req = $prereqs->{$phase}{'requires'} ) { + my $cmr = CPAN::Meta::Requirements->from_string_hash( $req ); + $collector->add_requirements( $cmr ); + } + } +} + +my %include = map {; $_ => 1 } qw( -my @modules = qw( - CPAN::Meta - CPAN::Meta::Requirements - Carp - Exporter - ExtUtils::MakeMaker - File::Spec - File::Spec::Functions - File::Temp - IO::File - IO::Handle - Inline - List::Util - Scalar::Util - Test::More - lib - perl - strict - warnings ); my %exclude = map {; $_ => 1 } qw( ); -my ($source) = grep { -f $_ } qw/MYMETA.json MYMETA.yml META.json/; -$source = "META.yml" unless defined $source; +# Add static prereqs to the included modules list +my $static_prereqs = do { my $x = { + 'configure' => { + 'requires' => { + 'ExtUtils::MakeMaker' => '6.17' + } + }, + 'develop' => { + 'requires' => { + 'Dist::Zilla' => '5.012', + 'Dist::Zilla::Plugin::OSPrereqs' => '0', + 'Dist::Zilla::Plugin::Prereqs' => '0', + 'Dist::Zilla::Plugin::RemovePrereqs' => '0', + 'Dist::Zilla::PluginBundle::DAGOLDEN' => '0.060', + 'File::Spec' => '0', + 'File::Temp' => '0', + 'IO::Handle' => '0', + 'IPC::Open3' => '0', + 'Pod::Coverage::TrustPod' => '0', + 'Test::CPAN::Meta' => '0', + 'Test::More' => '0', + 'Test::Pod' => '1.41', + 'Test::Pod::Coverage' => '1.08' + } + }, + 'runtime' => { + 'requires' => { + 'Carp' => '0', + 'Exporter' => '0', + 'File::Spec' => '0', + 'File::Temp' => '0', + 'IO::Handle' => '0', + 'Scalar::Util' => '0', + 'perl' => '5.006', + 'strict' => '0', + 'warnings' => '0' + } + }, + 'test' => { + 'recommends' => { + 'CPAN::Meta' => '0', + 'CPAN::Meta::Requirements' => '2.120900', + 'Inline' => '0.50' + }, + 'requires' => { + 'ExtUtils::MakeMaker' => '0', + 'File::Spec::Functions' => '0', + 'IO::File' => '0', + 'List::Util' => '0', + 'Test::More' => '0.62', + 'lib' => '0', + 'version' => '0' + } + } + }; + $x; + }; -# replace modules with dynamic results from MYMETA.json if we can -# (hide CPAN::Meta from prereq scanner) -my $cpan_meta = "CPAN::Meta"; -my $cpan_meta_req = "CPAN::Meta::Requirements"; +delete $static_prereqs->{develop} if not $ENV{AUTHOR_TESTING}; +$include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$static_prereqs; + +# Merge requirements for major phases (if we can) my $all_requires; -if ( -f $source && eval "require $cpan_meta" ) { ## no critic +if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) { + $all_requires = $cpan_meta_req->new; + _merge_requires($all_requires, $static_prereqs); +} + + +# Add dynamic prereqs to the included modules list (if we can) +my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; +if ( $source && $HAS_CPAN_META ) { if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { + my $dynamic_prereqs = $meta->prereqs; + delete $dynamic_prereqs->{develop} if not $ENV{AUTHOR_TESTING}; + $include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$dynamic_prereqs; - # Get ALL modules mentioned in META (any phase/type) - my $prereqs = $meta->prereqs; - delete $prereqs->{develop} if not $ENV{AUTHOR_TESTING}; - my %uniq = map {$_ => 1} map { keys %$_ } map { values %$_ } values %$prereqs; - $uniq{$_} = 1 for @modules; # don't lose any static ones - @modules = sort grep { ! $exclude{$_} } keys %uniq; - - # If verifying, merge 'requires' only for major phases - if ( 1 ) { - $prereqs = $meta->effective_prereqs; # get the object, not the hash - if (eval "require $cpan_meta_req; 1") { ## no critic - $all_requires = $cpan_meta_req->new; - for my $phase ( qw/configure build test runtime/ ) { - $all_requires->add_requirements( - $prereqs->requirements_for($phase, 'requires') - ); - } - } + if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) { + _merge_requires($all_requires, $dynamic_prereqs); } } } +else { + $source = 'static metadata'; +} +my @modules = sort grep { ! $exclude{$_} } keys %include; my @reports = [qw/Version Module/]; my @dep_errors; my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {}; @@ -84,7 +143,7 @@ $ver = "undef" unless defined $ver; # Newer MM should do this anyway push @reports, [$ver, $mod]; - if ( 1 && $all_requires ) { + if ( $DO_VERIFY_PREREQS && $all_requires ) { my $req = $req_hash->{$mod}; if ( defined $req && length $req ) { if ( ! defined eval { version->parse($ver) } ) { @@ -100,7 +159,7 @@ else { push @reports, ["missing", $mod]; - if ( 1 && $all_requires ) { + if ( $DO_VERIFY_PREREQS && $all_requires ) { my $req = $req_hash->{$mod}; if ( defined $req && length $req ) { push @dep_errors, "$mod is not installed (version '$req' required)"; @@ -128,4 +187,4 @@ pass; -# vim: ts=2 sts=2 sw=2 et: +# vim: ts=4 sts=4 sw=4 et: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/xt/author/00-compile.t new/Capture-Tiny-0.24/xt/author/00-compile.t --- old/Capture-Tiny-0.23/xt/author/00-compile.t 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/xt/author/00-compile.t 2014-02-06 23:15:44.000000000 +0100 @@ -1,7 +1,8 @@ +use 5.006; use strict; use warnings; -# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.037 +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039 use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); @@ -24,11 +25,12 @@ use IPC::Open3; use IO::Handle; +open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; + my @warnings; for my $lib (@module_files) { # see L<perlfaq8/How can I capture STDERR from an external command?> - open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/xt/author/pod-spell.t new/Capture-Tiny-0.24/xt/author/pod-spell.t --- old/Capture-Tiny-0.23/xt/author/pod-spell.t 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/xt/author/pod-spell.t 2014-02-06 23:15:44.000000000 +0100 @@ -2,7 +2,7 @@ use warnings; use Test::More; -# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006001 +# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006002 use Test::Spelling 0.12; use Pod::Wordlist; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/xt/release/distmeta.t new/Capture-Tiny-0.24/xt/release/distmeta.t --- old/Capture-Tiny-0.23/xt/release/distmeta.t 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/xt/release/distmeta.t 2014-02-06 23:15:44.000000000 +0100 @@ -1,4 +1,5 @@ #!perl +# This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::More; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/xt/release/pod-coverage.t new/Capture-Tiny-0.24/xt/release/pod-coverage.t --- old/Capture-Tiny-0.23/xt/release/pod-coverage.t 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/xt/release/pod-coverage.t 2014-02-06 23:15:44.000000000 +0100 @@ -1,4 +1,5 @@ #!perl +# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::More; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.23/xt/release/pod-syntax.t new/Capture-Tiny-0.24/xt/release/pod-syntax.t --- old/Capture-Tiny-0.23/xt/release/pod-syntax.t 2013-10-20 17:25:40.000000000 +0200 +++ new/Capture-Tiny-0.24/xt/release/pod-syntax.t 2014-02-06 23:15:44.000000000 +0100 @@ -1,4 +1,5 @@ #!perl +# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use Test::More; eval "use Test::Pod 1.41"; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
