Hello community,
here is the log from the commit of package perl-Test-Output for openSUSE:Factory checked in at 2013-07-31 17:24:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-Output (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-Output.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Output"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-Output/perl-Test-Output.changes 2011-09-23 12:39:06.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Test-Output.new/perl-Test-Output.changes 2013-07-31 17:24:31.000000000 +0200
@@ -1,0 +2,11 @@
+Sat Jul 27 11:58:48 UTC 2013 - coolo@suse.com
+
+- updated to 1.02
+ * Bump to stable release
+ * Remove the ::Tie stuff. It should be fully Capture::Tiny
+ now.
+ * David Golden re-did everything with Capture::Tiny
+ to get around the odd output paths that we coudn't
+ handle with a tie.
+
+-------------------------------------------------------------------
Old:
----
Test-Output-1.01.tar.gz
New:
----
Test-Output-1.02.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-Output.spec ++++++
--- /var/tmp/diff_new_pack.fW5c3G/_old 2013-07-31 17:24:32.000000000 +0200
+++ /var/tmp/diff_new_pack.fW5c3G/_new 2013-07-31 17:24:32.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-Output
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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
@@ -16,23 +16,25 @@
#
-
Name: perl-Test-Output
-Version: 1.01
-Release: 1
-License: GPL-1.0+ or Artistic-1.0
+Version: 1.02
+Release: 0
%define cpan_name Test-Output
Summary: Utilities to test STDOUT and STDERR messages.
-Url: http://search.cpan.org/dist/Test-Output/
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
+Url: http://search.cpan.org/dist/Test-Output/
Source: http://www.cpan.org/authors/id/B/BD/BDFOY/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
+BuildRequires: perl(Capture::Tiny) >= 0.17
BuildRequires: perl(File::Temp) >= 0.17
BuildRequires: perl(Sub::Exporter)
BuildRequires: perl(Test::Tester) >= 0.107
+#BuildRequires: perl(Test::Output)
+Requires: perl(Capture::Tiny) >= 0.17
Requires: perl(File::Temp) >= 0.17
Requires: perl(Sub::Exporter)
Requires: perl(Test::Tester) >= 0.107
@@ -47,7 +49,9 @@
however, the features provided by the Sub::Exporter manpage over what the
Exporter manpage provides is just to great to pass up.
-Test::Output ties STDOUT and STDERR using Test::Output::Tie.
+Likewise, Capture::Tiny provides a much more robust capture mechanism
+without than the original Test::Output::Tie. (Test::Output::Tie is
+deprecated, but included for backwards compatibility.)
%prep
%setup -q -n %{cpan_name}-%{version}
@@ -64,11 +68,8 @@
%perl_process_packlist
%perl_gen_filelist
-%clean
-%{__rm} -rf %{buildroot}
-
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes LICENSE README TODO
+%doc Changes LICENSE MYMETA.json README TODO
%changelog
++++++ Test-Output-1.01.tar.gz -> Test-Output-1.02.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Output-1.01/Changes new/Test-Output-1.02/Changes
--- old/Test-Output-1.01/Changes 2011-04-22 07:59:02.000000000 +0200
+++ new/Test-Output-1.02/Changes 2013-07-09 04:15:57.000000000 +0200
@@ -1,5 +1,17 @@
Revision history for Test-Output
+1.02 - Mon Jul 8 21:15:30 2013
+ * Bump to stable release
+
+1.01_02 - Thu Jul 19 06:18:35 2012
+ * Remove the ::Tie stuff. It should be fully Capture::Tiny
+ now.
+
+1.01_01 - Mon May 14 16:05:22 2012
+ * David Golden re-did everything with Capture::Tiny
+ to get around the odd output paths that we coudn't
+ handle with a tie.
+
1.01 - Fri Apr 22 07:58:19 2011
* Bump to a full release. This fixes the tests that failed
in the new 5.14 regex stringification
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Output-1.01/MANIFEST new/Test-Output-1.02/MANIFEST
--- old/Test-Output-1.01/MANIFEST 2011-04-22 07:59:03.000000000 +0200
+++ new/Test-Output-1.02/MANIFEST 2013-07-09 04:15:59.000000000 +0200
@@ -1,10 +1,10 @@
Changes
lib/Test/Output.pm
-lib/Test/Output/Tie.pm
LICENSE
Makefile.PL
MANIFEST
MANIFEST.SKIP
+MYMETA.json
README
t/00.load.t
t/binmode.t
@@ -28,4 +28,5 @@
t/stdout_like.t
t/stdout_unlike.t
TODO
-META.yml Module meta-data (added by MakeMaker)
+META.yml Module YAML meta-data (added by MakeMaker)
+META.json Module JSON meta-data (added by MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Output-1.01/META.json new/Test-Output-1.02/META.json
--- old/Test-Output-1.01/META.json 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Output-1.02/META.json 2013-07-09 04:15:59.000000000 +0200
@@ -0,0 +1,56 @@
+{
+ "abstract" : "Utilities to test STDOUT and STDERR messages.",
+ "author" : [
+ "brian d foy "
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150",
+ "keywords" : [
+ "testing",
+ "STDOUT",
+ "STDERR"
+ ],
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Test-Output",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Capture::Tiny" : "0.17",
+ "File::Temp" : "0.17",
+ "Sub::Exporter" : 0,
+ "Test::More" : 0,
+ "Test::Tester" : "0.107",
+ "perl" : "5.006"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "repository" : {
+ "url" : "git://github.com/briandfoy/test-output.git"
+ }
+ },
+ "version" : "1.02"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Output-1.01/META.yml new/Test-Output-1.02/META.yml
--- old/Test-Output-1.01/META.yml 2011-04-22 07:59:03.000000000 +0200
+++ new/Test-Output-1.02/META.yml 2013-07-09 04:15:59.000000000 +0200
@@ -1,32 +1,33 @@
---- #YAML:1.0
-name: Test-Output
-version: 1.01
-abstract: Utilities to test STDOUT and STDERR messages.
+---
+abstract: 'Utilities to test STDOUT and STDERR messages.'
author:
- - brian d foy
-license: perl
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
+ - 'brian d foy '
build_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150'
+keywords:
+ - testing
+ - STDOUT
+ - STDERR
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Test-Output
+no_index:
+ directory:
+ - t
+ - inc
requires:
- File::Temp: 0.17
- perl: 5.006
- Sub::Exporter: 0
- Test::More: 0
- Test::Tester: 0.107
+ Capture::Tiny: 0.17
+ File::Temp: 0.17
+ Sub::Exporter: 0
+ Test::More: 0
+ Test::Tester: 0.107
+ perl: 5.006
resources:
- repository: git://github.com/briandfoy/test-output.git
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.55_02
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
-keywords:
- - testing
- - STDOUT
- - STDERR
+ repository: git://github.com/briandfoy/test-output.git
+version: 1.02
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Output-1.01/MYMETA.json new/Test-Output-1.02/MYMETA.json
--- old/Test-Output-1.01/MYMETA.json 1970-01-01 01:00:00.000000000 +0100
+++ new/Test-Output-1.02/MYMETA.json 2013-07-09 04:15:58.000000000 +0200
@@ -0,0 +1,56 @@
+{
+ "abstract" : "Utilities to test STDOUT and STDERR messages.",
+ "author" : [
+ "brian d foy "
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150",
+ "keywords" : [
+ "testing",
+ "STDOUT",
+ "STDERR"
+ ],
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Test-Output",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Capture::Tiny" : "0.17",
+ "File::Temp" : "0.17",
+ "Sub::Exporter" : 0,
+ "Test::More" : 0,
+ "Test::Tester" : "0.107",
+ "perl" : "5.006"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "repository" : {
+ "url" : "git://github.com/briandfoy/test-output.git"
+ }
+ },
+ "version" : "1.02"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Output-1.01/Makefile.PL new/Test-Output-1.02/Makefile.PL
--- old/Test-Output-1.01/Makefile.PL 2011-04-22 07:59:02.000000000 +0200
+++ new/Test-Output-1.02/Makefile.PL 2013-07-09 04:15:57.000000000 +0200
@@ -18,6 +18,7 @@
'Test::More' => '0',
'Sub::Exporter' => '0',
'File::Temp' => '0.17', # needs :seekable
+ 'Capture::Tiny' => '0.17',
},
(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Output-1.01/lib/Test/Output/Tie.pm new/Test-Output-1.02/lib/Test/Output/Tie.pm
--- old/Test-Output-1.01/lib/Test/Output/Tie.pm 2011-04-22 07:59:02.000000000 +0200
+++ new/Test-Output-1.02/lib/Test/Output/Tie.pm 1970-01-01 01:00:00.000000000 +0100
@@ -1,121 +0,0 @@
-package Test::Output::Tie;
-use vars qw($VERSION);
-
-$VERSION='1.01';
-
-use strict;
-use warnings;
-
-=head1 NAME
-
-Test::Output::Tie - module used by Test::Output to tie STDERR and STDOUT
-
-=head1 DESCRIPTION
-
-You are probably more interested in reading Test::Output.
-
-This module is used to tie STDOUT and STDERR in Test::Output.
-
-=cut
-
-=head2 Methods
-
-=over 4
-
-=item TIEHANDLE
-
-The constructor for the class.
-
-=cut
-
-sub TIEHANDLE {
- my $class = shift;
- my $scalar = '';
- my $obj = shift || \$scalar;
-
- bless( $obj, $class);
-}
-
-=item PRINT
-
-This method is called each time STDERR or STDOUT are printed to.
-
-=cut
-
-sub PRINT {
- my $self = shift;
- $$self .= join(defined $, ? $, : '', @_);
- $$self .= defined $\ ? $\ : ''; # for say()
-}
-
-=item PRINTF
-
-This method is called each time STDERR or STDOUT are printed to with C<printf>.
-
-=cut
-
-sub PRINTF {
- my $self = shift;
- my $fmt = shift;
- $$self .= sprintf $fmt, @_;
-}
-
-=item FILENO
-
-=cut
-
-sub FILENO {}
-
-=item BINMODE
-
-=cut
-
-sub BINMODE {}
-
-=item read
-
-This function is used to return all output printed to STDOUT or STDERR.
-
-=cut
-
-sub read {
- my $self = shift;
- my $data = $$self;
- $$self = '';
- return $data;
-}
-
-=back
-
-=head1 AUTHOR
-
-Currently maintained by brian d foy, C.
-
-Shawn Sorichetti, C<< >>
-
-=head1 SOURCE AVAILABILITY
-
-This module is in Github:
-
- http://github.com/briandfoy/test-output/tree/master
-
-=head1 COPYRIGHT & LICENSE
-
-Currently maintained by brian d foy, C.
-
-Copyright 2005-2008 Shawn Sorichetti, All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-
-=head1 ACKNOWLEDGMENTS
-
-This code was taken from Test::Simple's TieOut.pm maintained
-Michael G Schwern. TieOut.pm was originally written by chromatic.
-
-Thanks for the idea and use of the code.
-
-=cut
-
-1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Output-1.01/lib/Test/Output.pm new/Test-Output-1.02/lib/Test/Output.pm
--- old/Test-Output-1.01/lib/Test/Output.pm 2011-04-22 07:59:02.000000000 +0200
+++ new/Test-Output-1.02/lib/Test/Output.pm 2013-07-09 04:15:57.000000000 +0200
@@ -5,7 +5,7 @@
use strict;
use Test::Builder;
-use Test::Output::Tie;
+use Capture::Tiny qw/capture capture_stdout capture_stderr capture_merged/;
use Sub::Exporter -setup => {
exports => [
qw(output_is output_isnt output_like output_unlike
@@ -65,7 +65,7 @@
=cut
-$VERSION = '1.01';
+$VERSION = '1.02';
=head1 SYNOPSIS
@@ -111,7 +111,9 @@
however, the features provided by LSub::Exporter over what L<Exporter>
provides is just to great to pass up.
-Test::Output ties STDOUT and STDERR using Test::Output::Tie.
+Likewise, Capture::Tiny provides a much more robust capture mechanism without
+than the original Test::Output::Tie. (Test::Output::Tie is deprecated, but
+included for backwards compatibility.)
=cut
@@ -484,7 +486,7 @@
except that $coderef is only executed once.
Unlike, stdout_is() and stderr_is() which ignore STDERR and STDOUT
-repectively, output_is() requires both STDOUT and STDERR to match in order
+respectively, output_is() requires both STDOUT and STDERR to match in order
to pass. Setting either $expected_stdout or $expected_stderr to C<undef>
ignores STDOUT or STDERR respectively.
@@ -819,14 +821,10 @@
sub stdout_from (&) {
my $test = shift;
- select( ( select(STDOUT), $| = 1 )[0] );
- my $out = tie *STDOUT, 'Test::Output::Tie';
-
- &$test;
- my $stdout = $out->read;
-
- undef $out;
- untie *STDOUT;
+ my $stdout = capture_stdout {
+ select( ( select(STDOUT), $| = 1 )[0] );
+ $test->()
+ };
return $stdout;
}
@@ -843,17 +841,14 @@
sub stderr_from (&) {
my $test = shift;
+ # XXX why is this here and not in output_from or combined_from -- xdg, 2012-05-13
local $SIG{__WARN__} = sub { print STDERR @_ }
if $] < 5.008;
-
- select( ( select(STDERR), $| = 1 )[0] );
- my $err = tie *STDERR, 'Test::Output::Tie';
- &$test;
- my $stderr = $err->read;
-
- undef $err;
- untie *STDERR;
+ my $stderr = capture_stderr {
+ select( ( select(STDERR), $| = 1 )[0] );
+ $test->()
+ };
return $stderr;
}
@@ -870,19 +865,11 @@
sub output_from (&) {
my $test = shift;
- select( ( select(STDOUT), $| = 1 )[0] );
- select( ( select(STDERR), $| = 1 )[0] );
- my $out = tie *STDOUT, 'Test::Output::Tie';
- my $err = tie *STDERR, 'Test::Output::Tie';
-
- &$test;
- my $stdout = $out->read;
- my $stderr = $err->read;
-
- undef $out;
- undef $err;
- untie *STDOUT;
- untie *STDERR;
+ my ($stdout, $stderr) = capture {
+ select( ( select(STDOUT), $| = 1 )[0] );
+ select( ( select(STDERR), $| = 1 )[0] );
+ $test->();
+ };
return ( $stdout, $stderr );
}
@@ -900,25 +887,13 @@
sub combined_from (&) {
my $test = shift;
- select( ( select(STDOUT), $| = 1 )[0] );
- select( ( select(STDERR), $| = 1 )[0] );
-
- open( STDERR, ">&STDOUT" );
+ my $combined = capture_merged {
+ select( ( select(STDOUT), $| = 1 )[0] );
+ select( ( select(STDERR), $| = 1 )[0] );
+ $test->();
+ };
- my $out = tie *STDOUT, 'Test::Output::Tie';
- tie *STDERR, 'Test::Output::Tie', $out;
-
- &$test;
- my $combined = $out->read;
-
- undef $out;
- {
- no warnings;
- untie *STDOUT;
- untie *STDERR;
- }
-
- return ($combined);
+ return $combined;
}
sub _chkregex {
@@ -963,7 +938,7 @@
Thanks to chromatic whose TieOut.pm was the basis for capturing output.
-Also thanks to rjbs for his help cleaning the documention, and pushing me to
+Also thanks to rjbs for his help cleaning the documentation, and pushing me to
LSub::Exporter.
Thanks to David Wheeler for providing code block support and tests.
@@ -972,7 +947,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2005-2008 Shawn Sorichetti, All Rights Reserved.
+Copyright 2005-2013 Shawn Sorichetti, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org