Hello community,
here is the log from the commit of package perl-Capture-Tiny for openSUSE:Factory checked in at 2013-11-26 19:24:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-06-06 13:08:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Capture-Tiny.new/perl-Capture-Tiny.changes 2013-11-26 19:24:12.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Nov 26 07:35:33 UTC 2013 - coolo@suse.com
+
+- updated to 0.23
+ Fixed:
+
+ - minimum Perl prereq is back to 5.6 (but $diety help you if
+ you're still stuck on 5.6)
+
+ Documented:
+
+ - Added warning about using @_ in a capture block
+
+-------------------------------------------------------------------
Old:
----
Capture-Tiny-0.22.tar.gz
New:
----
Capture-Tiny-0.23.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Capture-Tiny.spec ++++++
--- /var/tmp/diff_new_pack.sgRZOz/_old 2013-11-26 19:24:12.000000000 +0100
+++ /var/tmp/diff_new_pack.sgRZOz/_new 2013-11-26 19:24:12.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-Capture-Tiny
-Version: 0.22
+Version: 0.23
Release: 0
%define cpan_name Capture-Tiny
Summary: Capture STDOUT and STDERR from Perl, XS or external programs
@@ -32,7 +32,9 @@
#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)
@@ -63,6 +65,6 @@
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes examples LICENSE perlcritic.rc README README.PATCHING Todo
+%doc Changes CONTRIBUTING cpanfile examples LICENSE perlcritic.rc README Todo
%changelog
++++++ Capture-Tiny-0.22.tar.gz -> Capture-Tiny-0.23.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/CONTRIBUTING new/Capture-Tiny-0.23/CONTRIBUTING
--- old/Capture-Tiny-0.22/CONTRIBUTING 1970-01-01 01:00:00.000000000 +0100
+++ new/Capture-Tiny-0.23/CONTRIBUTING 2013-10-20 17:25:40.000000000 +0200
@@ -0,0 +1,70 @@
+## HOW TO CONTRIBUTE
+
+Thank you for considering contributing to this distribution. This file
+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).
+
+### Getting dependencies
+
+See the included `cpanfile` file for a list of dependencies. If you have
+App::cpanminus 1.6 or later installed, you can use `cpanm` to satisfy
+dependencies like this:
+
+ $ cpanm --installdeps .
+
+Otherwise, you can install Module::CPANfile 1.0002 or later and then satisfy
+dependencies with the regular `cpan` client and `cpanfile-dump`:
+
+ $ cpan `cpanfile-dump`
+
+### Running tests
+
+You can run tests directly using the `prove` tool:
+
+ $ prove -l
+ $ prove -lv t/some_test_file.t
+
+For most distributions, `prove` is entirely sufficent for you to test any
+patches you have.
+
+### Code style and tidying
+
+Please try to match any existing coding style. If there is a `.perltidyrc`
+file, please install Perl::Tidy and use perltidy before submitting patches.
+
+If there is a `tidyall.ini` file, you can also install Code::TidyAll and run
+`tidyall` on a file or `tidyall -a` to tidy all files.
+
+### 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.)
+
+If you would like to submit a documentation edit, please limit yourself to the
+documentation you see.
+
+If you see typos or documentation issues in the generated docs, please
+email or open a bug ticket instead of patching.
+
+### Learning Dist::Zilla
+
+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:
+
+ $ cpan `dzil authordeps`
+ $ dzil authordeps | cpanm
+
+Once installed, here are some dzil commands you might try:
+
+ $ dzil build
+ $ dzil test
+ $ dzil xtest
+
+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.22/Changes new/Capture-Tiny-0.23/Changes
--- old/Capture-Tiny-0.22/Changes 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/Changes 2013-10-20 17:25:40.000000000 +0200
@@ -1,5 +1,16 @@
Revision history for Capture-Tiny
+0.23 2013-10-20 11:25:34 America/New_York
+
+ Fixed:
+
+ - minimum Perl prereq is back to 5.6 (but $diety help you if
+ you're still stuck on 5.6)
+
+ Documented:
+
+ - Added warning about using @_ in a capture block
+
0.22 2013-03-27 15:50:29 America/New_York
Documented:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/MANIFEST new/Capture-Tiny-0.23/MANIFEST
--- old/Capture-Tiny-0.22/MANIFEST 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/MANIFEST 2013-10-20 17:25:40.000000000 +0200
@@ -1,3 +1,4 @@
+CONTRIBUTING
Changes
LICENSE
MANIFEST
@@ -5,14 +6,13 @@
META.yml
Makefile.PL
README
-README.PATCHING
Todo
+cpanfile
dist.ini
examples/rt-58208.pl
examples/tee.pl
lib/Capture/Tiny.pm
perlcritic.rc
-t/00-compile.t
t/00-report-prereqs.t
t/01-Capture-Tiny.t
t/02-capture.t
@@ -40,6 +40,7 @@
t/lib/TieEvil.pm
t/lib/TieLC.pm
t/lib/Utils.pm
+xt/author/00-compile.t
xt/author/critic.t
xt/author/pod-spell.t
xt/release/distmeta.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/META.json new/Capture-Tiny-0.23/META.json
--- old/Capture-Tiny-0.22/META.json 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/META.json 2013-10-20 17:25:40.000000000 +0200
@@ -4,7 +4,7 @@
"David Golden "
],
"dynamic_config" : 1,
- "generated_by" : "Dist::Zilla version 4.300031, CPAN::Meta::Converter version 2.120921",
+ "generated_by" : "Dist::Zilla version 5.000, CPAN::Meta::Converter version 2.132830",
"license" : [
"apache_2_0"
],
@@ -27,13 +27,18 @@
"prereqs" : {
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "6.30"
+ "ExtUtils::MakeMaker" : "6.17"
}
},
"develop" : {
"requires" : {
+ "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"
}
@@ -46,44 +51,49 @@
"File::Temp" : "0",
"IO::Handle" : "0",
"Scalar::Util" : "0",
- "perl" : "5.008",
+ "perl" : "5.006",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"recommends" : {
+ "CPAN::Meta" : "0",
+ "CPAN::Meta::Requirements" : "0",
"Inline" : "0.50"
},
"requires" : {
- "Config" : "0",
"ExtUtils::MakeMaker" : "0",
- "File::Find" : "0",
"File::Spec::Functions" : "0",
"IO::File" : "0",
"List::Util" : "0",
- "Test::More" : "0.62"
+ "Test::More" : "0.62",
+ "lib" : "0"
}
}
},
"provides" : {
"Capture::Tiny" : {
"file" : "lib/Capture/Tiny.pm",
- "version" : "0.22"
+ "version" : "0.23"
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
- "web" : "https://github.com/dagolden/capture-tiny/issues"
+ "web" : "https://github.com/dagolden/Capture-Tiny/issues"
},
- "homepage" : "https://metacpan.org/release/Capture-Tiny",
+ "homepage" : "https://github.com/dagolden/Capture-Tiny",
"repository" : {
"type" : "git",
- "url" : "git://github.com/dagolden/capture-tiny.git",
- "web" : "https://github.com/dagolden/capture-tiny"
+ "url" : "https://github.com/dagolden/Capture-Tiny.git",
+ "web" : "https://github.com/dagolden/Capture-Tiny"
}
},
- "version" : "0.22"
+ "version" : "0.23",
+ "x_authority" : "cpan:DAGOLDEN",
+ "x_contributors" : [
+ "Dagfinn Ilmari Manns\u00e5ker "
+ ]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/META.yml new/Capture-Tiny-0.23/META.yml
--- old/Capture-Tiny-0.22/META.yml 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/META.yml 2013-10-20 17:25:40.000000000 +0200
@@ -3,17 +3,16 @@
author:
- 'David Golden '
build_requires:
- Config: 0
ExtUtils::MakeMaker: 0
- File::Find: 0
File::Spec::Functions: 0
IO::File: 0
List::Util: 0
Test::More: 0.62
+ lib: 0
configure_requires:
- ExtUtils::MakeMaker: 6.30
+ ExtUtils::MakeMaker: 6.17
dynamic_config: 1
-generated_by: 'Dist::Zilla version 4.300031, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Dist::Zilla version 5.000, CPAN::Meta::Converter version 2.132830'
license: apache
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -30,7 +29,7 @@
provides:
Capture::Tiny:
file: lib/Capture/Tiny.pm
- version: 0.22
+ version: 0.23
requires:
Carp: 0
Exporter: 0
@@ -38,11 +37,14 @@
File::Temp: 0
IO::Handle: 0
Scalar::Util: 0
- perl: 5.008
+ perl: 5.006
strict: 0
warnings: 0
resources:
- bugtracker: https://github.com/dagolden/capture-tiny/issues
- homepage: https://metacpan.org/release/Capture-Tiny
- repository: git://github.com/dagolden/capture-tiny.git
-version: 0.22
+ 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
+x_authority: cpan:DAGOLDEN
+x_contributors:
+ - 'Dagfinn Ilmari Mannsåker '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/Makefile.PL new/Capture-Tiny-0.23/Makefile.PL
--- old/Capture-Tiny-0.22/Makefile.PL 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/Makefile.PL 2013-10-20 17:25:40.000000000 +0200
@@ -2,26 +2,18 @@
use strict;
use warnings;
-use 5.008;
+use 5.006;
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker 6.17;
my %WriteMakefileArgs = (
"ABSTRACT" => "Capture STDOUT and STDERR from Perl, XS or external programs",
"AUTHOR" => "David Golden ",
- "BUILD_REQUIRES" => {
- "Config" => 0,
- "ExtUtils::MakeMaker" => 0,
- "File::Find" => 0,
- "File::Spec::Functions" => 0,
- "IO::File" => 0,
- "List::Util" => 0,
- "Test::More" => "0.62"
- },
+ "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
- "ExtUtils::MakeMaker" => "6.30"
+ "ExtUtils::MakeMaker" => "6.17"
},
"DISTNAME" => "Capture-Tiny",
"EXE_FILES" => [],
@@ -37,13 +29,34 @@
"strict" => 0,
"warnings" => 0
},
- "VERSION" => "0.22",
+ "TEST_REQUIRES" => {
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec::Functions" => 0,
+ "IO::File" => 0,
+ "List::Util" => 0,
+ "Test::More" => "0.62",
+ "lib" => 0
+ },
+ "VERSION" => "0.23",
"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};
+ }
+ }
+}
+
unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
my $pp = $WriteMakefileArgs{PREREQ_PM};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/README new/Capture-Tiny-0.23/README
--- old/Capture-Tiny-0.22/README 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/README 2013-10-20 17:25:40.000000000 +0200
@@ -3,7 +3,7 @@
programs
VERSION
- version 0.22
+ version 0.23
SYNOPSIS
use Capture::Tiny ':all';
@@ -74,6 +74,21 @@
return scalar @list; # $count will be 3
};
+ Also note that within the coderef, the @_ variable will be empty. So
+ don't use arguments from a surrounding subroutine without copying them
+ to an array first:
+
+ sub wont_work {
+ my ($stdout, $stderr) = capture { do_stuff( @_ ) }; # WRONG
+ ...
+ }
+
+ sub will_work {
+ my @args = @_;
+ my ($stdout, $stderr) = capture { do_stuff( @args ) }; # RIGHT
+ ...
+ }
+
Captures are normally done to an anonymous temporary filehandle. To
capture via a named file (e.g. to externally monitor a long-running
capture), provide custom filehandles as a trailing list of option pairs:
@@ -312,20 +327,23 @@
SUPPORT
Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker at
- https://github.com/dagolden/capture-tiny/issues. You will be notified
+ https://github.com/dagolden/Capture-Tiny/issues. You will be notified
automatically of any progress on your issue.
Source Code
This is open source software. The code repository is available for
public review and contribution under the terms of the license.
- https://github.com/dagolden/capture-tiny
+ https://github.com/dagolden/Capture-Tiny
- git clone git://github.com/dagolden/capture-tiny.git
+ git clone https://github.com/dagolden/Capture-Tiny.git
AUTHOR
David Golden
+CONTRIBUTOR
+ Dagfinn Ilmari Mannsåker
+
COPYRIGHT AND LICENSE
This software is Copyright (c) 2009 by David Golden.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/README.PATCHING new/Capture-Tiny-0.23/README.PATCHING
--- old/Capture-Tiny-0.22/README.PATCHING 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/README.PATCHING 1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-README.PATCHING
-
-Thank you for considering contributing to this distribution. This file
-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).
-
-However, you can run tests directly using the 'prove' tool:
-
- $ prove -l
- $ prove -lv t/some_test_file.t
-
-For most distributions, 'prove' is entirely sufficent for you to test any
-patches you have.
-
-Likewise, 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.) If you would like to
-submit a documentation edit, please limit yourself to the documentation you
-see.
-
-If you see typos or documentation issues in the generated docs, please
-email or open a bug ticket instead of patching.
-
-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:
-
- $ cpan `dzil authordeps`
- $ dzil authordeps | cpanm
-
-Once installed, here are some dzil commands you might try:
-
- $ dzil build
- $ dzil test
- $ dzil xtest
-
-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.22/cpanfile new/Capture-Tiny-0.23/cpanfile
--- old/Capture-Tiny-0.22/cpanfile 1970-01-01 01:00:00.000000000 +0100
+++ new/Capture-Tiny-0.23/cpanfile 2013-10-20 17:25:40.000000000 +0200
@@ -0,0 +1,40 @@
+requires "Carp" => "0";
+requires "Exporter" => "0";
+requires "File::Spec" => "0";
+requires "File::Temp" => "0";
+requires "IO::Handle" => "0";
+requires "Scalar::Util" => "0";
+requires "perl" => "5.006";
+requires "strict" => "0";
+requires "warnings" => "0";
+
+on 'test' => sub {
+ requires "ExtUtils::MakeMaker" => "0";
+ requires "File::Spec::Functions" => "0";
+ requires "IO::File" => "0";
+ requires "List::Util" => "0";
+ requires "Test::More" => "0.62";
+ requires "lib" => "0";
+};
+
+on 'test' => sub {
+ recommends "CPAN::Meta" => "0";
+ recommends "CPAN::Meta::Requirements" => "0";
+ recommends "Inline" => "0.50";
+};
+
+on 'configure' => sub {
+ requires "ExtUtils::MakeMaker" => "6.17";
+};
+
+on 'develop' => sub {
+ requires "File::Spec" => "0";
+ requires "File::Temp" => "0";
+ requires "IO::Handle" => "0";
+ requires "IPC::Open3" => "0";
+ requires "Pod::Coverage::TrustPod" => "0";
+ requires "Test::CPAN::Meta" => "0";
+ requires "Test::More" => "0";
+ requires "Test::Pod" => "1.41";
+ requires "Test::Pod::Coverage" => "1.08";
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/dist.ini new/Capture-Tiny-0.23/dist.ini
--- old/Capture-Tiny-0.22/dist.ini 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/dist.ini 2013-10-20 17:25:40.000000000 +0200
@@ -5,9 +5,7 @@
copyright_year = 2009
[@DAGOLDEN]
-:version = 0.043
-AutoMetaResources.bugtracker.rt = 0
-AutoMetaResources.bugtracker.github = user:dagolden
+:version = 0.056
stopwords = UTF
stopwords = seekable
stopwords = prototyped
@@ -22,7 +20,11 @@
remove = PerlIO::scalar
remove = Test::Differences
remove = Inline
+; tests optionally require 5.008
+remove = perl
[Prereqs / TestRecommends]
Inline = 0.50
+[Prereqs]
+perl = 5.006
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/lib/Capture/Tiny.pm new/Capture-Tiny-0.23/lib/Capture/Tiny.pm
--- old/Capture-Tiny-0.22/lib/Capture/Tiny.pm 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/lib/Capture/Tiny.pm 2013-10-20 17:25:40.000000000 +0200
@@ -3,7 +3,7 @@
use warnings;
package Capture::Tiny;
# ABSTRACT: Capture STDOUT and STDERR from Perl, XS or external programs
-our $VERSION = '0.22'; # VERSION
+our $VERSION = '0.23'; # VERSION
use Carp ();
use Exporter ();
use IO::Handle ();
@@ -114,7 +114,7 @@
_open $dup{stdin} = IO::Handle->new, "<&=STDIN";
}
$proxies{stdin} = \*STDIN;
- binmode(STDIN, ':utf8') if $] >= 5.008;
+ binmode(STDIN, ':utf8') if $] >= 5.008; ## no critic
}
if ( ! defined fileno STDOUT ) {
$proxy_count{stdout}++;
@@ -128,7 +128,7 @@
_open $dup{stdout} = IO::Handle->new, ">&=STDOUT";
}
$proxies{stdout} = \*STDOUT;
- binmode(STDOUT, ':utf8') if $] >= 5.008;
+ binmode(STDOUT, ':utf8') if $] >= 5.008; ## no critic
}
if ( ! defined fileno STDERR ) {
$proxy_count{stderr}++;
@@ -142,7 +142,7 @@
_open $dup{stderr} = IO::Handle->new, ">&=STDERR";
}
$proxies{stderr} = \*STDERR;
- binmode(STDERR, ':utf8') if $] >= 5.008;
+ binmode(STDERR, ':utf8') if $] >= 5.008; ## no critic
}
return %proxies;
}
@@ -405,7 +405,7 @@
=pod
-=encoding utf-8
+=encoding UTF-8
=head1 NAME
@@ -413,7 +413,7 @@
=head1 VERSION
-version 0.22
+version 0.23
=head1 SYNOPSIS
@@ -486,6 +486,21 @@
return scalar @list; # $count will be 3
};
+Also note that within the coderef, the C<<< @_ >>> variable will be empty. So don't
+use arguments from a surrounding subroutine without copying them to an array
+first:
+
+ sub wont_work {
+ my ($stdout, $stderr) = capture { do_stuff( @_ ) }; # WRONG
+ ...
+ }
+
+ sub will_work {
+ my @args = @_;
+ my ($stdout, $stderr) = capture { do_stuff( @args ) }; # RIGHT
+ ...
+ }
+
Captures are normally done to an anonymous temporary filehandle. To
capture via a named file (e.g. to externally monitor a long-running capture),
provide custom filehandles as a trailing list of option pairs:
@@ -786,7 +801,7 @@
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
-at Lhttps://github.com/dagolden/capture-tiny/issues.
+at Lhttps://github.com/dagolden/Capture-Tiny/issues.
You will be notified automatically of any progress on your issue.
=head2 Source Code
@@ -794,14 +809,18 @@
This is open source software. The code repository is available for
public review and contribution under the terms of the license.
-Lhttps://github.com/dagolden/capture-tiny
+Lhttps://github.com/dagolden/Capture-Tiny
- git clone git://github.com/dagolden/capture-tiny.git
+ git clone https://github.com/dagolden/Capture-Tiny.git
=head1 AUTHOR
David Golden
+=head1 CONTRIBUTOR
+
+Dagfinn Ilmari Mannsåker
+
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2009 by David Golden.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/perlcritic.rc new/Capture-Tiny-0.23/perlcritic.rc
--- old/Capture-Tiny-0.22/perlcritic.rc 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/perlcritic.rc 2013-10-20 17:25:40.000000000 +0200
@@ -4,6 +4,9 @@
[Variables::ProhibitPunctuationVars]
allow = $@ $!
+[TestingAndDebugging::ProhibitNoStrict]
+allow = refs
+
# Turn these off
[-BuiltinFunctions::ProhibitStringyEval]
[-ControlStructures::ProhibitPostfixControls]
@@ -13,7 +16,7 @@
[-References::ProhibitDoubleSigils]
[-RegularExpressions::RequireExtendedFormatting]
[-InputOutput::ProhibitTwoArgOpen]
-[-InputOutput::RequireEncodingWithUTF8Layer]
+[-Modules::ProhibitEvilModules]
# Turn this on
[Lax::ProhibitStringyEval::ExceptForRequire]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/t/00-compile.t new/Capture-Tiny-0.23/t/00-compile.t
--- old/Capture-Tiny-0.22/t/00-compile.t 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/t/00-compile.t 1970-01-01 01:00:00.000000000 +0100
@@ -1,74 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use Test::More;
-
-
-
-use File::Find;
-use File::Temp qw{ tempdir };
-
-my @modules;
-find(
- sub {
- return if $File::Find::name !~ /\.pm\z/;
- my $found = $File::Find::name;
- $found =~ s{^lib/}{};
- $found =~ s{[/\\]}{::}g;
- $found =~ s/\.pm$//;
- # nothing to skip
- push @modules, $found;
- },
- 'lib',
-);
-
-sub _find_scripts {
- my $dir = shift @_;
-
- my @found_scripts = ();
- find(
- sub {
- return unless -f;
- my $found = $File::Find::name;
- # nothing to skip
- open my $FH, '<', $_ or do {
- note( "Unable to open $found in ( $! ), skipping" );
- return;
- };
- my $shebang = <$FH>;
- return unless $shebang =~ /^#!.*?\bperl\b\s*$/;
- push @found_scripts, $found;
- },
- $dir,
- );
-
- return @found_scripts;
-}
-
-my @scripts;
-do { push @scripts, _find_scripts($_) if -d $_ }
- for qw{ bin script scripts };
-
-my $plan = scalar(@modules) + scalar(@scripts);
-$plan ? (plan tests => $plan) : (plan skip_all => "no tests to run");
-
-{
- # fake home for cpan-testers
- local $ENV{HOME} = tempdir( CLEANUP => 1 );
-
- like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" )
- for sort @modules;
-
- SKIP: {
- eval "use Test::Script 1.05; 1;";
- skip "Test::Script needed to test script compilation", scalar(@scripts) if $@;
- foreach my $file ( @scripts ) {
- my $script = $file;
- $script =~ s!.*/!!;
- script_compiles( $file, "$script script compiles" );
- }
- }
-
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/t/00-report-prereqs.t new/Capture-Tiny-0.23/t/00-report-prereqs.t
--- old/Capture-Tiny-0.22/t/00-report-prereqs.t 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/t/00-report-prereqs.t 2013-10-20 17:25:40.000000000 +0200
@@ -3,6 +3,8 @@
use strict;
use warnings;
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.010
+
use Test::More tests => 1;
use ExtUtils::MakeMaker;
@@ -10,11 +12,11 @@
use List::Util qw/max/;
my @modules = qw(
+ CPAN::Meta
+ CPAN::Meta::Requirements
Carp
- Config
Exporter
ExtUtils::MakeMaker
- File::Find
File::Spec
File::Spec::Functions
File::Temp
@@ -24,25 +26,52 @@
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;
+
# replace modules with dynamic results from MYMETA.json if we can
# (hide CPAN::Meta from prereq scanner)
my $cpan_meta = "CPAN::Meta";
-if ( -f "MYMETA.json" && eval "require $cpan_meta" ) { ## no critic
- if ( my $meta = eval { CPAN::Meta->load_file("MYMETA.json") } ) {
+my $cpan_meta_req = "CPAN::Meta::Requirements";
+my $all_requires;
+if ( -f $source && eval "require $cpan_meta" ) { ## no critic
+ if ( my $meta = eval { CPAN::Meta->load_file($source) } ) {
+
+ # Get ALL modules mentioned in META (any phase/type)
my $prereqs = $meta->prereqs;
- delete $prereqs->{develop};
+ 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 keys %uniq;
+ @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')
+ );
+ }
+ }
+ }
}
}
my @reports = [qw/Version Module/];
+my @dep_errors;
+my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {};
for my $mod ( @modules ) {
next if $mod eq 'perl';
@@ -54,9 +83,29 @@
my $ver = MM->parse_version( catfile($prefix, $file) );
$ver = "undef" unless defined $ver; # Newer MM should do this anyway
push @reports, [$ver, $mod];
+
+ if ( 1 && $all_requires ) {
+ my $req = $req_hash->{$mod};
+ if ( defined $req && length $req ) {
+ if ( ! defined eval { version->parse($ver) } ) {
+ push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)";
+ }
+ elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) {
+ push @dep_errors, "$mod version '$ver' is not in required range '$req'";
+ }
+ }
+ }
+
}
else {
push @reports, ["missing", $mod];
+
+ if ( 1 && $all_requires ) {
+ my $req = $req_hash->{$mod};
+ if ( defined $req && length $req ) {
+ push @dep_errors, "$mod is not installed (version '$req' required)";
+ }
+ }
}
}
@@ -64,7 +113,17 @@
my $vl = max map { length $_->[0] } @reports;
my $ml = max map { length $_->[1] } @reports;
splice @reports, 1, 0, ["-" x $vl, "-" x $ml];
- diag "Prerequisite Report:\n", map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
+ diag "\nVersions for all modules listed in $source (including optional ones):\n",
+ map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
+}
+
+if ( @dep_errors ) {
+ diag join("\n",
+ "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n",
+ "The following REQUIRED prerequisites were not satisfied:\n",
+ @dep_errors,
+ "\n"
+ );
}
pass;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/xt/author/00-compile.t new/Capture-Tiny-0.23/xt/author/00-compile.t
--- old/Capture-Tiny-0.22/xt/author/00-compile.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Capture-Tiny-0.23/xt/author/00-compile.t 2013-10-20 17:25:40.000000000 +0200
@@ -0,0 +1,51 @@
+use strict;
+use warnings;
+
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.037
+
+use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
+
+
+
+my @module_files = (
+ 'Capture/Tiny.pm'
+);
+
+
+
+# fake home for cpan-testers
+use File::Temp;
+local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 );
+
+
+my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
+
+use File::Spec;
+use IPC::Open3;
+use IO::Handle;
+
+my @warnings;
+for my $lib (@module_files)
+{
+ # see L
+ 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]");
+ binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+ my @_warnings = <$stderr>;
+ waitpid($pid, 0);
+ is($?, 0, "$lib loaded ok");
+
+ if (@_warnings)
+ {
+ warn @_warnings;
+ push @warnings, @_warnings;
+ }
+}
+
+
+
+is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/xt/author/pod-spell.t new/Capture-Tiny-0.23/xt/author/pod-spell.t
--- old/Capture-Tiny-0.22/xt/author/pod-spell.t 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/xt/author/pod-spell.t 2013-10-20 17:25:40.000000000 +0200
@@ -2,8 +2,9 @@
use warnings;
use Test::More;
-# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.004003
-eval "use Test::Spelling 0.12; use Pod::Wordlist::hanekomu; 1" or die $@;
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006001
+use Test::Spelling 0.12;
+use Pod::Wordlist;
add_stopwords(<DATA>);
@@ -17,6 +18,10 @@
David
Golden
dagolden
+Dagfinn
+Ilmari
+Mannsåker
+ilmari
lib
Capture
Tiny
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Capture-Tiny-0.22/xt/release/portability.t new/Capture-Tiny-0.23/xt/release/portability.t
--- old/Capture-Tiny-0.22/xt/release/portability.t 2013-03-27 20:50:36.000000000 +0100
+++ new/Capture-Tiny-0.23/xt/release/portability.t 2013-10-20 17:25:40.000000000 +0200
@@ -1,5 +1,8 @@
#!perl
+use strict;
+use warnings;
+
use Test::More;
eval 'use Test::Portability::Files';
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org