Hello community,
here is the log from the commit of package perl-Test-SharedFork for
openSUSE:Factory checked in at 2012-02-20 16:16:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-SharedFork (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-SharedFork.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-SharedFork", Maintainer is ""
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Test-SharedFork/perl-Test-SharedFork.changes
2011-11-21 12:48:11.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Test-SharedFork.new/perl-Test-SharedFork.changes
2012-02-20 16:16:52.000000000 +0100
@@ -1,0 +2,8 @@
+Mon Feb 20 08:38:23 UTC 2012 - [email protected]
+
+- updated to 0.20
+ - test_requires Time::HiRes for redhat.
+ (berekuk++)
+ - fixed TB2 support(tokuhirom)
+
+-------------------------------------------------------------------
Old:
----
Test-SharedFork-0.18.tar.gz
New:
----
Test-SharedFork-0.20.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-SharedFork.spec ++++++
--- /var/tmp/diff_new_pack.76egGu/_old 2012-02-20 16:16:53.000000000 +0100
+++ /var/tmp/diff_new_pack.76egGu/_new 2012-02-20 16:16:53.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-SharedFork
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 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
@@ -15,30 +15,47 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
Name: perl-Test-SharedFork
+Version: 0.20
+Release: 0
%define cpan_name Test-SharedFork
Summary: Fork test
-Version: 0.18
-Release: 1
-License: GPL-1.0+ or Artistic-1.0
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Test-SharedFork/
-Source:
http://www.cpan.org/authors/id/T/TO/TOKUHIROM/Test-SharedFork-%{version}.tar.gz
+Source:
http://www.cpan.org/authors/id/T/TO/TOKUHIROM/%{cpan_name}-%{version}.tar.gz
Patch0: tests-need-help.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
-BuildRequires: perl >= 5.8.0
-Requires: perl >= 5.8.0
+BuildRequires: perl(App::Prove)
+BuildRequires: perl(Test::More) >= 0.88
+BuildRequires: perl(Test::Requires)
+#BuildRequires: perl(inc::Module::Install)
+#BuildRequires: perl(JSON)
+#BuildRequires: perl(LWP::Simple)
+#BuildRequires: perl(Module::Build)
+#BuildRequires: perl(Module::Install::Base)
+#BuildRequires: perl(parent)
+#BuildRequires: perl(Parse::CPAN::Meta)
+#BuildRequires: perl(Pod::Markdown)
+#BuildRequires: perl(TB2::History)
+#BuildRequires: perl(Test::SharedFork)
+#BuildRequires: perl(Test::SharedFork::Array)
+#BuildRequires: perl(Test::SharedFork::Scalar)
+#BuildRequires: perl(Test::SharedFork::Store)
+#BuildRequires: perl(YAML::Tiny)
+Requires: perl(Test::More) >= 0.88
+%{perl_requires}
%description
-Test::SharedFork is utility module for Test::Builder. This module makes
-forking test!
+Test::SharedFork is utility module for Test::Builder.
+
+This module makes the fork(2) manpage safety in your test case.
+
+This module merges test count with parent process & child process.
%prep
%setup -q -n %{cpan_name}-%{version}
@@ -53,18 +70,11 @@
%install
%perl_make_install
-# do not perl_process_packlist (noarch)
-# remove .packlist file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
-# remove perllocal.pod file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
+%perl_process_packlist
%perl_gen_filelist
-%clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
%files -f %{name}.files
-%defattr(-,root,root,-)
-%doc Changes README README.mkdn
+%defattr(-,root,root,755)
+%doc Changes README
%changelog
++++++ Test-SharedFork-0.18.tar.gz -> Test-SharedFork-0.20.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/.gitignore
new/Test-SharedFork-0.20/.gitignore
--- old/Test-SharedFork-0.18/.gitignore 2011-08-01 04:51:36.000000000 +0200
+++ new/Test-SharedFork-0.20/.gitignore 2011-11-29 19:34:21.000000000 +0100
@@ -10,3 +10,17 @@
nytprof.out
\.sw[pon]
*.bak
+inc/
+ppport.h
+*.sw[po]
+*.old
+Build
+_build/
+xshelper.h
+tags
+blib/
+MYMETA.*
+META.json
+README
+^inc/
+Test-SharedFork-*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/Changes
new/Test-SharedFork-0.20/Changes
--- old/Test-SharedFork-0.18/Changes 2011-10-05 01:03:07.000000000 +0200
+++ new/Test-SharedFork-0.20/Changes 2012-02-10 00:58:59.000000000 +0100
@@ -1,5 +1,14 @@
Revision history for Perl extension Test::SharedFork
+0.20
+
+ - test_requires Time::HiRes for redhat.
+ (berekuk++)
+
+0.19
+
+ - fixed TB2 support(tokuhirom)
+
0.18
- More fixes for failure locations(hoelzro)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/MANIFEST
new/Test-SharedFork-0.20/MANIFEST
--- old/Test-SharedFork-0.18/MANIFEST 2011-10-03 10:29:36.000000000 +0200
+++ new/Test-SharedFork-0.20/MANIFEST 2011-11-29 20:25:05.000000000 +0100
@@ -1,19 +1,16 @@
.gitignore
Changes
-inc/App/Prove.pm
inc/Module/Install.pm
inc/Module/Install/AuthorTests.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/Fetch.pm
-inc/Module/Install/Include.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/ReadmeMarkdownFromPod.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
inc/Pod/Markdown.pm
-inc/Test/Requires.pm
lib/Test/SharedFork.pm
lib/Test/SharedFork/Array.pm
lib/Test/SharedFork/Scalar.pm
@@ -22,7 +19,6 @@
MANIFEST This list of files
META.yml
README
-README.mkdn
t/00_compile.t
t/01_simple.t
t/02_fork_method.t
@@ -42,4 +38,6 @@
xt/01_podspell.t
xt/02_perlcritic.t
xt/03_pod.t
-xt/perlcriticrc
+xt/04_minimum_version.t
+xt/05_cpan_meta.t
+xt/06_meta_author.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/META.yml
new/Test-SharedFork-0.20/META.yml
--- old/Test-SharedFork-0.18/META.yml 2011-10-05 01:03:20.000000000 +0200
+++ new/Test-SharedFork-0.20/META.yml 2012-02-10 00:59:15.000000000 +0100
@@ -3,11 +3,15 @@
author:
- 'Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>'
build_requires:
+ App::Prove: 0
ExtUtils::MakeMaker: 6.42
+ Test::Requires: 0
+ Time::HiRes: 0
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 1.01'
+dynamic_config: 1
+generated_by: 'Module::Install version 1.03'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -23,4 +27,4 @@
perl: 5.8.0
resources:
license: http://dev.perl.org/licenses/
-version: 0.18
+version: 0.20
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/Makefile.PL
new/Test-SharedFork-0.20/Makefile.PL
--- old/Test-SharedFork-0.18/Makefile.PL 2011-08-01 04:55:48.000000000
+0200
+++ new/Test-SharedFork-0.20/Makefile.PL 2012-02-10 00:58:28.000000000
+0100
@@ -11,10 +11,10 @@
test_requires 'App::Prove';
test_requires 'Test::Requires';
+test_requires 'Time::HiRes'; # workaround for redhat.
https://github.com/tokuhirom/test-sharedfork/pull/3
tests 't/*.t t/*/*.t t/*/*/*.t';
author_tests 'xt';
readme_markdown_from 'lib/Test/SharedFork.pm';
-auto_include;
WriteAll;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/README.mkdn
new/Test-SharedFork-0.20/README.mkdn
--- old/Test-SharedFork-0.18/README.mkdn 2011-10-05 01:03:19.000000000
+0200
+++ new/Test-SharedFork-0.20/README.mkdn 1970-01-01 01:00:00.000000000
+0100
@@ -1,53 +0,0 @@
-# NAME
-
-Test::SharedFork - fork test
-
-# SYNOPSIS
-
- use Test::More tests => 200;
- use Test::SharedFork;
-
- my $pid = fork();
- if ($pid == 0) {
- # child
- ok 1, "child $_" for 1..100;
- } elsif ($pid) {
- # parent
- ok 1, "parent $_" for 1..100;
- waitpid($pid, 0);
- } else {
- die $!;
- }
-
-# DESCRIPTION
-
-Test::SharedFork is utility module for Test::Builder.
-
-This module makes L<fork(2)> safety in your test case.
-
-This module merges test count with parent process & child process.
-
-# LIMITATIONS
-
-This version of the Test::SharedFork does not support ithreads, because
[threads::shared](http://search.cpan.org/perldoc?threads::shared) conflicts
with [Storable](http://search.cpan.org/perldoc?Storable).
-
-# AUTHOR
-
-Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>
-
-yappo
-
-# THANKS TO
-
-kazuhooku
-
-konbuizm
-
-# SEE ALSO
-
-[Test::TCP](http://search.cpan.org/perldoc?Test::TCP),
[Test::Fork](http://search.cpan.org/perldoc?Test::Fork),
[Test::MultipleFork](http://search.cpan.org/perldoc?Test::MultipleFork)
-
-# LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/App/Prove.pm
new/Test-SharedFork-0.20/inc/App/Prove.pm
--- old/Test-SharedFork-0.18/inc/App/Prove.pm 2011-10-05 01:03:19.000000000
+0200
+++ new/Test-SharedFork-0.20/inc/App/Prove.pm 1970-01-01 01:00:00.000000000
+0100
@@ -1,582 +0,0 @@
-#line 1
-package App::Prove;
-
-use strict;
-use vars qw($VERSION @ISA);
-
-use TAP::Object ();
-use TAP::Harness;
-use TAP::Parser::Utils qw( split_shell );
-use File::Spec;
-use Getopt::Long;
-use App::Prove::State;
-use Carp;
-
-#line 22
-
-$VERSION = '3.23';
-
-#line 40
-
-use constant IS_WIN32 => ( $^O =~ /^(MS)?Win32$/ );
-use constant IS_VMS => $^O eq 'VMS';
-use constant IS_UNIXY => !( IS_VMS || IS_WIN32 );
-
-use constant STATE_FILE => IS_UNIXY ? '.prove' : '_prove';
-use constant RC_FILE => IS_UNIXY ? '.proverc' : '_proverc';
-
-use constant PLUGINS => 'App::Prove::Plugin';
-
-my @ATTR;
-
-BEGIN {
- @ISA = qw(TAP::Object);
-
- @ATTR = qw(
- archive argv blib show_count color directives exec failures comments
- formatter harness includes modules plugins jobs lib merge parse quiet
- really_quiet recurse backwards shuffle taint_fail taint_warn timer
- verbose warnings_fail warnings_warn show_help show_man show_version
- state_class test_args state dry extensions ignore_exit rules
state_manager
- normalize sources tapversion trap
- );
- __PACKAGE__->mk_methods(@ATTR);
-}
-
-#line 76
-
-# new() implementation supplied by TAP::Object
-
-sub _initialize {
- my $self = shift;
- my $args = shift || {};
-
- my @is_array = qw(
- argv rc_opts includes modules state plugins rules sources
- );
-
- # setup defaults:
- for my $key (@is_array) {
- $self->{$key} = [];
- }
- $self->{harness_class} = 'TAP::Harness';
-
- for my $attr (@ATTR) {
- if ( exists $args->{$attr} ) {
-
- # TODO: Some validation here
- $self->{$attr} = $args->{$attr};
- }
- }
-
- my %env_provides_default = (
- HARNESS_TIMER => 'timer',
- );
-
- while ( my ( $env, $attr ) = each %env_provides_default ) {
- $self->{$attr} = 1 if $ENV{$env};
- }
- $self->state_class('App::Prove::State');
- return $self;
-}
-
-#line 123
-
-#line 132
-
-sub add_rc_file {
- my ( $self, $rc_file ) = @_;
-
- local *RC;
- open RC, "<$rc_file" or croak "Can't read $rc_file ($!)";
- while ( defined( my $line = <RC> ) ) {
- push @{ $self->{rc_opts} },
- grep { defined and not /^#/ }
- $line =~ m{ ' ([^']*) ' | " ([^"]*) " | (\#.*) | (\S+) }xg;
- }
- close RC;
-}
-
-#line 156
-
-sub process_args {
- my $self = shift;
-
- my @rc = RC_FILE;
- unshift @rc, glob '~/' . RC_FILE if IS_UNIXY;
-
- # Preprocess meta-args.
- my @args;
- while ( defined( my $arg = shift ) ) {
- if ( $arg eq '--norc' ) {
- @rc = ();
- }
- elsif ( $arg eq '--rc' ) {
- defined( my $rc = shift )
- or croak "Missing argument to --rc";
- push @rc, $rc;
- }
- elsif ( $arg =~ m{^--rc=(.+)$} ) {
- push @rc, $1;
- }
- else {
- push @args, $arg;
- }
- }
-
- # Everything after the arisdottle '::' gets passed as args to
- # test programs.
- if ( defined( my $stop_at = _first_pos( '::', @args ) ) ) {
- my @test_args = splice @args, $stop_at;
- shift @test_args;
- $self->{test_args} = \@test_args;
- }
-
- # Grab options from RC files
- $self->add_rc_file($_) for grep -f, @rc;
- unshift @args, @{ $self->{rc_opts} };
-
- if ( my @bad = map {"-$_"} grep {/^-(man|help)$/} @args ) {
- die "Long options should be written with two dashes: ",
- join( ', ', @bad ), "\n";
- }
-
- # And finally...
-
- {
- local @ARGV = @args;
- Getopt::Long::Configure(qw(no_ignore_case bundling pass_through));
-
- # Don't add coderefs to GetOptions
- GetOptions(
- 'v|verbose' => \$self->{verbose},
- 'f|failures' => \$self->{failures},
- 'o|comments' => \$self->{comments},
- 'l|lib' => \$self->{lib},
- 'b|blib' => \$self->{blib},
- 's|shuffle' => \$self->{shuffle},
- 'color!' => \$self->{color},
- 'colour!' => \$self->{color},
- 'count!' => \$self->{show_count},
- 'c' => \$self->{color},
- 'D|dry' => \$self->{dry},
- 'ext=s@' => sub {
- my ( $opt, $val ) = @_;
- # Workaround for Getopt::Long 2.25 handling of
- # multivalue options
- push @{ $self->{extensions} ||= [] }, $val;
- },
- 'harness=s' => \$self->{harness},
- 'ignore-exit' => \$self->{ignore_exit},
- 'source=s@' => $self->{sources},
- 'formatter=s' => \$self->{formatter},
- 'r|recurse' => \$self->{recurse},
- 'reverse' => \$self->{backwards},
- 'p|parse' => \$self->{parse},
- 'q|quiet' => \$self->{quiet},
- 'Q|QUIET' => \$self->{really_quiet},
- 'e|exec=s' => \$self->{exec},
- 'm|merge' => \$self->{merge},
- 'I=s@' => $self->{includes},
- 'M=s@' => $self->{modules},
- 'P=s@' => $self->{plugins},
- 'state=s@' => $self->{state},
- 'directives' => \$self->{directives},
- 'h|help|?' => \$self->{show_help},
- 'H|man' => \$self->{show_man},
- 'V|version' => \$self->{show_version},
- 'a|archive=s' => \$self->{archive},
- 'j|jobs=i' => \$self->{jobs},
- 'timer' => \$self->{timer},
- 'T' => \$self->{taint_fail},
- 't' => \$self->{taint_warn},
- 'W' => \$self->{warnings_fail},
- 'w' => \$self->{warnings_warn},
- 'normalize' => \$self->{normalize},
- 'rules=s@' => $self->{rules},
- 'tapversion=s' => \$self->{tapversion},
- 'trap' => \$self->{trap},
- ) or croak('Unable to continue');
-
- # Stash the remainder of argv for later
- $self->{argv} = [@ARGV];
- }
-
- return;
-}
-
-sub _first_pos {
- my $want = shift;
- for ( 0 .. $#_ ) {
- return $_ if $_[$_] eq $want;
- }
- return;
-}
-
-sub _help {
- my ( $self, $verbosity ) = @_;
-
- eval('use Pod::Usage 1.12 ()');
- if ( my $err = $@ ) {
- die 'Please install Pod::Usage for the --help option '
- . '(or try `perldoc prove`.)'
- . "\n ($@)";
- }
-
- Pod::Usage::pod2usage( { -verbose => $verbosity } );
-
- return;
-}
-
-sub _color_default {
- my $self = shift;
-
- return -t STDOUT && !$ENV{HARNESS_NOTTY} && !IS_WIN32;
-}
-
-sub _get_args {
- my $self = shift;
-
- my %args;
-
- $args{trap} = 1 if $self->trap;
-
- if ( defined $self->color ? $self->color : $self->_color_default ) {
- $args{color} = 1;
- }
- if ( !defined $self->show_count ) {
- $args{show_count} = 1;
- }
- else {
- $args{show_count} = $self->show_count;
- }
-
- if ( $self->archive ) {
- $self->require_harness( archive => 'TAP::Harness::Archive' );
- $args{archive} = $self->archive;
- }
-
- if ( my $jobs = $self->jobs ) {
- $args{jobs} = $jobs;
- }
-
- if ( my $harness_opt = $self->harness ) {
- $self->require_harness( harness => $harness_opt );
- }
-
- if ( my $formatter = $self->formatter ) {
- $args{formatter_class} = $formatter;
- }
-
- for my $handler ( @{ $self->sources } ) {
- my ( $name, $config ) = $self->_parse_source($handler);
- $args{sources}->{$name} = $config;
- }
-
- if ( $self->ignore_exit ) {
- $args{ignore_exit} = 1;
- }
-
- if ( $self->taint_fail && $self->taint_warn ) {
- die '-t and -T are mutually exclusive';
- }
-
- if ( $self->warnings_fail && $self->warnings_warn ) {
- die '-w and -W are mutually exclusive';
- }
-
- for my $a (qw( lib switches )) {
- my $method = "_get_$a";
- my $val = $self->$method();
- $args{$a} = $val if defined $val;
- }
-
- # Handle verbose, quiet, really_quiet flags
- my %verb_map = ( verbose => 1, quiet => -1, really_quiet => -2, );
-
- my @verb_adj = grep {$_} map { $self->$_() ? $verb_map{$_} : 0 }
- keys %verb_map;
-
- die "Only one of verbose, quiet or really_quiet should be specified\n"
- if @verb_adj > 1;
-
- $args{verbosity} = shift @verb_adj || 0;
-
- for my $a (qw( merge failures comments timer directives normalize )) {
- $args{$a} = 1 if $self->$a();
- }
-
- $args{errors} = 1 if $self->parse;
-
- # defined but zero-length exec runs test files as binaries
- $args{exec} = [ split( /\s+/, $self->exec ) ]
- if ( defined( $self->exec ) );
-
- $args{version} = $self->tapversion if defined( $self->tapversion );
-
- if ( defined( my $test_args = $self->test_args ) ) {
- $args{test_args} = $test_args;
- }
-
- if ( @{ $self->rules } ) {
- my @rules;
- for ( @{ $self->rules } ) {
- if (/^par=(.*)/) {
- push @rules, $1;
- }
- elsif (/^seq=(.*)/) {
- push @rules, { seq => $1 };
- }
- }
- $args{rules} = { par => [@rules] };
- }
-
- return ( \%args, $self->{harness_class} );
-}
-
-sub _find_module {
- my ( $self, $class, @search ) = @_;
-
- croak "Bad module name $class"
- unless $class =~ /^ \w+ (?: :: \w+ ) *$/x;
-
- for my $pfx (@search) {
- my $name = join( '::', $pfx, $class );
- eval "require $name";
- return $name unless $@;
- }
-
- eval "require $class";
- return $class unless $@;
- return;
-}
-
-sub _load_extension {
- my ( $self, $name, @search ) = @_;
-
- my @args = ();
- if ( $name =~ /^(.*?)=(.*)/ ) {
- $name = $1;
- @args = split( /,/, $2 );
- }
-
- if ( my $class = $self->_find_module( $name, @search ) ) {
- $class->import(@args);
- if ( $class->can('load') ) {
- $class->load( { app_prove => $self, args => [@args] } );
- }
- }
- else {
- croak "Can't load module $name";
- }
-}
-
-sub _load_extensions {
- my ( $self, $ext, @search ) = @_;
- $self->_load_extension( $_, @search ) for @$ext;
-}
-
-sub _parse_source {
- my ( $self, $handler ) = @_;
-
- # Load any options.
- ( my $opt_name = lc $handler ) =~ s/::/-/g;
- local @ARGV = @{ $self->{argv} };
- my %config;
- Getopt::Long::GetOptions(
- "$opt_name-option=s%" => sub {
- my ( $name, $k, $v ) = @_;
- if ( $v =~ /(?<!\\)=/ ) {
-
- # It's a hash option.
- croak "Option $name must be consistently used as a hash"
- if exists $config{$k} && ref $config{$k} ne 'HASH';
- $config{$k} ||= {};
- my ( $hk, $hv ) = split /(?<!\\)=/, $v, 2;
- $config{$k}{$hk} = $hv;
- }
- else {
- $v =~ s/\\=/=/g;
- if ( exists $config{$k} ) {
- $config{$k} = [ $config{$k} ]
- unless ref $config{$k} eq 'ARRAY';
- push @{ $config{$k} } => $v;
- }
- else {
- $config{$k} = $v;
- }
- }
- }
- );
- $self->{argv} = \@ARGV;
- return ( $handler, \%config );
-}
-
-#line 482
-
-sub run {
- my $self = shift;
-
- unless ( $self->state_manager ) {
- $self->state_manager(
- $self->state_class->new( { store => STATE_FILE } ) );
- }
-
- if ( $self->show_help ) {
- $self->_help(1);
- }
- elsif ( $self->show_man ) {
- $self->_help(2);
- }
- elsif ( $self->show_version ) {
- $self->print_version;
- }
- elsif ( $self->dry ) {
- print "$_\n" for $self->_get_tests;
- }
- else {
-
- $self->_load_extensions( $self->modules );
- $self->_load_extensions( $self->plugins, PLUGINS );
-
- local $ENV{TEST_VERBOSE} = 1 if $self->verbose;
-
- return $self->_runtests( $self->_get_args, $self->_get_tests );
- }
-
- return 1;
-}
-
-sub _get_tests {
- my $self = shift;
-
- my $state = $self->state_manager;
- my $ext = $self->extensions;
- $state->extensions($ext) if defined $ext;
- if ( defined( my $state_switch = $self->state ) ) {
- $state->apply_switch(@$state_switch);
- }
-
- my @tests = $state->get_tests( $self->recurse, @{ $self->argv } );
-
- $self->_shuffle(@tests) if $self->shuffle;
- @tests = reverse @tests if $self->backwards;
-
- return @tests;
-}
-
-sub _runtests {
- my ( $self, $args, $harness_class, @tests ) = @_;
- my $harness = $harness_class->new($args);
-
- my $state = $self->state_manager;
-
- $harness->callback(
- after_test => sub {
- $state->observe_test(@_);
- }
- );
-
- $harness->callback(
- after_runtests => sub {
- $state->commit(@_);
- }
- );
-
- my $aggregator = $harness->runtests(@tests);
-
- return !$aggregator->has_errors;
-}
-
-sub _get_switches {
- my $self = shift;
- my @switches;
-
- # notes that -T or -t must be at the front of the switches!
- if ( $self->taint_fail ) {
- push @switches, '-T';
- }
- elsif ( $self->taint_warn ) {
- push @switches, '-t';
- }
- if ( $self->warnings_fail ) {
- push @switches, '-W';
- }
- elsif ( $self->warnings_warn ) {
- push @switches, '-w';
- }
-
- push @switches, split_shell( $ENV{HARNESS_PERL_SWITCHES} );
-
- return @switches ? \@switches : ();
-}
-
-sub _get_lib {
- my $self = shift;
- my @libs;
- if ( $self->lib ) {
- push @libs, 'lib';
- }
- if ( $self->blib ) {
- push @libs, 'blib/lib', 'blib/arch';
- }
- if ( @{ $self->includes } ) {
- push @libs, @{ $self->includes };
- }
-
- #24926
- @libs = map { File::Spec->rel2abs($_) } @libs;
-
- # Huh?
- return @libs ? \@libs : ();
-}
-
-sub _shuffle {
- my $self = shift;
-
- # Fisher-Yates shuffle
- my $i = @_;
- while ($i) {
- my $j = rand $i--;
- @_[ $i, $j ] = @_[ $j, $i ];
- }
- return;
-}
-
-#line 619
-
-sub require_harness {
- my ( $self, $for, $class ) = @_;
-
- my ($class_name) = $class =~ /^(\w+(?:::\w+)*)/;
-
- # Emulate Perl's -MModule=arg1,arg2 behaviour
- $class =~ s!^(\w+(?:::\w+)*)=(.*)$!$1 split(/,/,q{$2})!;
-
- eval("use $class;");
- die "$class_name is required to use the --$for feature: $@" if $@;
-
- $self->{harness_class} = $class_name;
-
- return;
-}
-
-#line 642
-
-sub print_version {
- my $self = shift;
- printf(
- "TAP::Harness v%s and Perl v%vd\n",
- $TAP::Harness::VERSION, $^V
- );
-
- return;
-}
-
-1;
-
-# vim:ts=4:sw=4:et:sta
-
-__END__
-
-#line 835
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install/Base.pm
new/Test-SharedFork-0.20/inc/Module/Install/Base.pm
--- old/Test-SharedFork-0.18/inc/Module/Install/Base.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install/Base.pm 2012-02-10
00:59:14.000000000 +0100
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.03';
}
# Suspend handler for "redefined" warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install/Can.pm
new/Test-SharedFork-0.20/inc/Module/Install/Can.pm
--- old/Test-SharedFork-0.18/inc/Module/Install/Can.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install/Can.pm 2012-02-10
00:59:14.000000000 +0100
@@ -9,7 +9,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.03';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install/Fetch.pm
new/Test-SharedFork-0.20/inc/Module/Install/Fetch.pm
--- old/Test-SharedFork-0.18/inc/Module/Install/Fetch.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install/Fetch.pm 2012-02-10
00:59:14.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.03';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install/Include.pm
new/Test-SharedFork-0.20/inc/Module/Install/Include.pm
--- old/Test-SharedFork-0.18/inc/Module/Install/Include.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install/Include.pm 1970-01-01
01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-#line 1
-package Module::Install::Include;
-
-use strict;
-use Module::Install::Base ();
-
-use vars qw{$VERSION @ISA $ISCORE};
-BEGIN {
- $VERSION = '1.01';
- @ISA = 'Module::Install::Base';
- $ISCORE = 1;
-}
-
-sub include {
- shift()->admin->include(@_);
-}
-
-sub include_deps {
- shift()->admin->include_deps(@_);
-}
-
-sub auto_include {
- shift()->admin->auto_include(@_);
-}
-
-sub auto_include_deps {
- shift()->admin->auto_include_deps(@_);
-}
-
-sub auto_include_dependent_dists {
- shift()->admin->auto_include_dependent_dists(@_);
-}
-
-1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install/Makefile.pm
new/Test-SharedFork-0.20/inc/Module/Install/Makefile.pm
--- old/Test-SharedFork-0.18/inc/Module/Install/Makefile.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install/Makefile.pm 2012-02-10
00:59:14.000000000 +0100
@@ -8,7 +8,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.03';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install/Metadata.pm
new/Test-SharedFork-0.20/inc/Module/Install/Metadata.pm
--- old/Test-SharedFork-0.18/inc/Module/Install/Metadata.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install/Metadata.pm 2012-02-10
00:59:14.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.03';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -151,15 +151,21 @@
sub install_as_vendor { $_[0]->installdirs('vendor') }
sub dynamic_config {
- my $self = shift;
- unless ( @_ ) {
- warn "You MUST provide an explicit true/false value to
dynamic_config\n";
- return $self;
+ my $self = shift;
+ my $value = @_ ? shift : 1;
+ if ( $self->{values}->{dynamic_config} ) {
+ # Once dynamic we never change to static, for safety
+ return 0;
}
- $self->{values}->{dynamic_config} = $_[0] ? 1 : 0;
+ $self->{values}->{dynamic_config} = $value ? 1 : 0;
return 1;
}
+# Convenience command
+sub static_config {
+ shift->dynamic_config(0);
+}
+
sub perl_version {
my $self = shift;
return $self->{values}->{perl_version} unless @_;
@@ -170,7 +176,7 @@
# Normalize the version
$version = $self->_perl_version($version);
- # We don't support the reall old versions
+ # We don't support the really old versions
unless ( $version >= 5.005 ) {
die "Module::Install only supports 5.005 or newer (use
ExtUtils::MakeMaker)\n";
}
@@ -582,7 +588,7 @@
sub requires_from {
my $self = shift;
my $content = Module::Install::_readperl($_[0]);
- my @requires = $content =~
m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+ my @requires = $content =~
m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg;
while ( @requires ) {
my $module = shift @requires;
my $version = shift @requires;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install/Win32.pm
new/Test-SharedFork-0.20/inc/Module/Install/Win32.pm
--- old/Test-SharedFork-0.18/inc/Module/Install/Win32.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install/Win32.pm 2012-02-10
00:59:14.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.03';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install/WriteAll.pm
new/Test-SharedFork-0.20/inc/Module/Install/WriteAll.pm
--- old/Test-SharedFork-0.18/inc/Module/Install/WriteAll.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install/WriteAll.pm 2012-02-10
00:59:14.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.03';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Module/Install.pm
new/Test-SharedFork-0.20/inc/Module/Install.pm
--- old/Test-SharedFork-0.18/inc/Module/Install.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Module/Install.pm 2012-02-10
00:59:14.000000000 +0100
@@ -31,7 +31,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.01';
+ $VERSION = '1.03';
# Storage for the pseudo-singleton
$MAIN = undef;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/inc/Test/Requires.pm
new/Test-SharedFork-0.20/inc/Test/Requires.pm
--- old/Test-SharedFork-0.18/inc/Test/Requires.pm 2011-10-05
01:03:19.000000000 +0200
+++ new/Test-SharedFork-0.20/inc/Test/Requires.pm 1970-01-01
01:00:00.000000000 +0100
@@ -1,74 +0,0 @@
-#line 1
-package Test::Requires;
-use strict;
-use warnings;
-our $VERSION = '0.06';
-use base 'Test::Builder::Module';
-use 5.006000;
-
-sub import {
- my $class = shift;
- my $caller = caller(0);
-
- # export methods
- {
- no strict 'refs';
- *{"$caller\::test_requires"} = \&test_requires;
- }
-
- # test arguments
- if (@_ == 1 && ref $_[0] && ref $_[0] eq 'HASH') {
- while (my ($mod, $ver) = each %{$_[0]}) {
- test_requires($mod, $ver, $caller);
- }
- } else {
- for my $mod (@_) {
- test_requires($mod, undef, $caller);
- }
- }
-}
-
-sub test_requires {
- my ( $mod, $ver, $caller ) = @_;
- return if $mod eq __PACKAGE__;
- if (@_ != 3) {
- $caller = caller(0);
- }
- $ver ||= '';
-
- eval qq{package $caller; use $mod $ver}; ## no critic.
- if (my $e = $@) {
- my $skip_all = sub {
- my $builder = __PACKAGE__->builder;
-
- if (not defined $builder->has_plan) {
- $builder->skip_all(@_);
- } elsif ($builder->has_plan eq 'no_plan') {
- $builder->skip(@_);
- if ( $builder->can('parent') && $builder->parent ) {
- die bless {} => 'Test::Builder::Exception';
- }
- exit 0;
- } else {
- for (1..$builder->has_plan) {
- $builder->skip(@_);
- }
- if ( $builder->can('parent') && $builder->parent ) {
- die bless {} => 'Test::Builder::Exception';
- }
- exit 0;
- }
- };
- if ( $e =~ /^Can't locate/ ) {
- $skip_all->("Test requires module '$mod' but it's not found");
- }
- else {
- $skip_all->("$e");
- }
- }
-}
-
-1;
-__END__
-
-#line 128
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/lib/Test/SharedFork.pm
new/Test-SharedFork-0.20/lib/Test/SharedFork.pm
--- old/Test-SharedFork-0.18/lib/Test/SharedFork.pm 2011-10-05
01:02:45.000000000 +0200
+++ new/Test-SharedFork-0.20/lib/Test/SharedFork.pm 2012-02-10
00:58:37.000000000 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use base 'Test::Builder::Module';
-our $VERSION = '0.18';
+our $VERSION = '0.20';
use Test::Builder 0.32; # 0.32 or later is needed
use Test::SharedFork::Scalar;
use Test::SharedFork::Array;
@@ -50,25 +50,23 @@
die "# Current version of Test::SharedFork does not supports
ithreads.";
}
- if (Test::Builder->VERSION > 2.00) {
+ if (Test::Builder->VERSION > 1.005) {
+ # TODO: hook TB2::threads::shared::off instead of following hacks.
# new Test::Builder
$STORE = Test::SharedFork::Store->new();
+ require TB2::History;
+ # wrap the moriginal methods
our $level = 0;
- for my $class (qw/Test::Builder2::History Test::Builder2::Counter/) {
+ for my $class (qw/TB2::History TB2::Counter/) {
my $meta = $class->meta;
my @methods = $meta->get_method_list;
- my $orig =
- $class eq 'Test::Builder2::History'
- ? $builder->{History}
- : $builder->{History}->counter;
- $orig->{test_sharedfork_hacked}++;
- $STORE->set($class => $orig);
for my $method (@methods) {
next if $method =~ /^_/;
next if $method eq 'meta';
next if $method eq 'create';
next if $method eq 'singleton';
+ next if $method eq 'buildstack';
$meta->add_around_method_modifier(
$method => sub {
my ($code, $orig_self, @args) = @_;
@@ -86,6 +84,15 @@
);
}
}
+ for my $obj ( $builder->counter ) {
+ my $klass = ref($obj);
+ unless ($klass) {
+ require Data::Dumper;
+ die "Cannot fetch object: " . Data::Dumper::Dumper($builder);
+ }
+ $obj->{test_sharedfork_hacked}++;
+ $STORE->set( $klass => $obj );
+ }
} else {
# older Test::Builder
$STORE = Test::SharedFork::Store->new(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/xt/02_perlcritic.t
new/Test-SharedFork-0.20/xt/02_perlcritic.t
--- old/Test-SharedFork-0.18/xt/02_perlcritic.t 2011-08-01 04:51:36.000000000
+0200
+++ new/Test-SharedFork-0.20/xt/02_perlcritic.t 2011-11-29 19:34:22.000000000
+0100
@@ -1,8 +1,12 @@
use strict;
use Test::More;
-eval {
- require Test::Perl::Critic;
- Test::Perl::Critic->import( -profile => 'xt/perlcriticrc');
+eval q{
+ use Test::Perl::Critic 1.02 -exclude => [
+ 'Subroutines::ProhibitSubroutinePrototypes',
+ 'Subroutines::ProhibitExplicitReturnUndef',
+ 'TestingAndDebugging::ProhibitNoStrict',
+ 'ControlStructures::ProhibitMutatingListFunctions',
+ ]
};
-plan skip_all => "Test::Perl::Critic is not installed." if $@;
+plan skip_all => "Test::Perl::Critic 1.02+ is not installed." if $@;
all_critic_ok('lib');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/xt/04_minimum_version.t
new/Test-SharedFork-0.20/xt/04_minimum_version.t
--- old/Test-SharedFork-0.18/xt/04_minimum_version.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-SharedFork-0.20/xt/04_minimum_version.t 2011-11-29
19:34:22.000000000 +0100
@@ -0,0 +1,4 @@
+use Test::More;
+eval "use Test::MinimumVersion 0.101080";
+plan skip_all => "Test::Minimumversion required for testing perl minimum
version" if $@;
+all_minimum_version_from_metayml_ok();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/xt/05_cpan_meta.t
new/Test-SharedFork-0.20/xt/05_cpan_meta.t
--- old/Test-SharedFork-0.18/xt/05_cpan_meta.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Test-SharedFork-0.20/xt/05_cpan_meta.t 2011-11-29 19:34:22.000000000
+0100
@@ -0,0 +1,5 @@
+use Test::More;
+eval "use Test::CPAN::Meta";
+plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
+plan skip_all => "There is no META.yml" unless -f "META.yml";
+meta_yaml_ok();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/xt/06_meta_author.t
new/Test-SharedFork-0.20/xt/06_meta_author.t
--- old/Test-SharedFork-0.18/xt/06_meta_author.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-SharedFork-0.20/xt/06_meta_author.t 2011-11-29
19:49:48.000000000 +0100
@@ -0,0 +1,10 @@
+use strict;
+use Test::More;
+eval "use Parse::CPAN::Meta";
+plan skip_all => "Parse::CPAN::Meta required for testing META.yml" unless eval
"use Parse::CPAN::Meta; 1;";
+plan skip_all => "There is no META.yml" unless -f "META.yml";
+
+my $meta = Parse::CPAN::Meta->load_file('META.yml');
+isnt($meta->{author}->[0], 'unknown', 'author info');
+ok($meta->{'requires'}->{'perl'}, 'metayml_declares_perl_version');
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-SharedFork-0.18/xt/perlcriticrc
new/Test-SharedFork-0.20/xt/perlcriticrc
--- old/Test-SharedFork-0.18/xt/perlcriticrc 2011-08-01 04:51:36.000000000
+0200
+++ new/Test-SharedFork-0.20/xt/perlcriticrc 1970-01-01 01:00:00.000000000
+0100
@@ -1,2 +0,0 @@
-[TestingAndDebugging::ProhibitNoStrict]
-allow=refs
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]