summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorChad Granum <exodist7@gmail.com>2015-01-03 13:04:16 -0800
committerJames E Keenan <jkeenan@cpan.org>2015-01-03 16:17:25 -0500
commitfa87ec39c0ab9e6a9009caf5bc528efa6dc8aabc (patch)
tree001f0291b9d11ffc5249bb6e7682acddbe9ce0d4 /cpan
parente1540eef436d76fbcfcaede75c0d6bb89848130f (diff)
downloadperl-fa87ec39c0ab9e6a9009caf5bc528efa6dc8aabc.tar.gz
Test-Simple Version Bump, 1.301001_096 (RC16)
Mainly fixes for older perls. Still important to bring this in line with what is on cpan.
Diffstat (limited to 'cpan')
-rw-r--r--cpan/Test-Simple/lib/Test/Builder.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Module.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Tester.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/CanThread.pm29
-rw-r--r--cpan/Test-Simple/lib/Test/More.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Simple.pm4
-rw-r--r--cpan/Test-Simple/lib/Test/Stream.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Stream/Block.pm16
-rw-r--r--cpan/Test-Simple/lib/Test/Stream/PackageUtil.pm3
-rw-r--r--cpan/Test-Simple/lib/Test/Tester.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/use/ok.pm2
-rw-r--r--cpan/Test-Simple/lib/ok.pm2
-rw-r--r--cpan/Test-Simple/t/Test-Stream-Exporter.t8
-rw-r--r--cpan/Test-Simple/t/Test-Stream-PackageUtil.t4
15 files changed, 51 insertions, 31 deletions
diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm
index 1528248920..03da6e2dba 100644
--- a/cpan/Test-Simple/lib/Test/Builder.pm
+++ b/cpan/Test-Simple/lib/Test/Builder.pm
@@ -4,7 +4,7 @@ use 5.008001;
use strict;
use warnings;
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
diff --git a/cpan/Test-Simple/lib/Test/Builder/Module.pm b/cpan/Test-Simple/lib/Test/Builder/Module.pm
index e31eded66b..fc37bf2ded 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Module.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Module.pm
@@ -8,7 +8,7 @@ use Test::Builder 0.99;
require Exporter;
our @ISA = qw(Exporter);
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester.pm b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
index 367608f69c..d8b58363a0 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Tester.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
@@ -1,7 +1,7 @@
package Test::Builder::Tester;
use strict;
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Stream 1.301001 '-internal';
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
index e5d91a1208..441e4baacd 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
@@ -1,7 +1,7 @@
package Test::Builder::Tester::Color;
use strict;
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Stream 1.301001 '-internal';
diff --git a/cpan/Test-Simple/lib/Test/CanThread.pm b/cpan/Test-Simple/lib/Test/CanThread.pm
index 58ac8da3cb..0e022f028b 100644
--- a/cpan/Test-Simple/lib/Test/CanThread.pm
+++ b/cpan/Test-Simple/lib/Test/CanThread.pm
@@ -12,11 +12,6 @@ $works &&= eval { require threads; 'threads'->import; 1 };
sub import {
my $class = shift;
- if ($] == 5.010000) {
- require Test::More;
- Test::More::plan(skip_all => "Threads are broken on 5.10.0");
- }
-
unless ($works) {
require Test::More;
Test::More::plan(skip_all => "Skip no working threads");
@@ -34,6 +29,30 @@ sub import {
Test::More::plan(skip_all => "This threaded test will only run when the '$var' environment variable is set.");
}
+ if ($] == 5.010000) {
+ require File::Temp;
+ require File::Spec;
+
+ my $perl = File::Spec->rel2abs($^X);
+ my ($fh, $fn) = File::Temp::tempfile();
+ print $fh <<' EOT';
+ BEGIN { print STDERR "# Checking for thread segfaults\n# " }
+ use threads;
+ my $t = threads->create(sub { 1 });
+ $t->join;
+ print STDERR "Threads appear to work\n";
+ exit 0;
+ EOT
+ close($fh);
+
+ my $exit = system(qq{"$perl" "$fn"});
+
+ if ($exit) {
+ require Test::More;
+ Test::More::plan(skip_all => "Threads segfault on this perl");
+ }
+ }
+
my $caller = caller;
eval "package $caller; use threads; 1" || die $@;
}
diff --git a/cpan/Test-Simple/lib/Test/More.pm b/cpan/Test-Simple/lib/Test/More.pm
index c0d958e7eb..39e65d41c4 100644
--- a/cpan/Test-Simple/lib/Test/More.pm
+++ b/cpan/Test-Simple/lib/Test/More.pm
@@ -4,7 +4,7 @@ use 5.008001;
use strict;
use warnings;
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Stream 1.301001 '-internal';
diff --git a/cpan/Test-Simple/lib/Test/Simple.pm b/cpan/Test-Simple/lib/Test/Simple.pm
index ac30ea4a4f..500abb13cd 100644
--- a/cpan/Test-Simple/lib/Test/Simple.pm
+++ b/cpan/Test-Simple/lib/Test/Simple.pm
@@ -5,10 +5,10 @@ use 5.008001;
use strict;
use warnings;
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
-use Test::Stream 1.301001_093 '-internal';
+use Test::Stream 1.301001_096 '-internal';
use Test::Stream::Toolset;
use Test::Stream::Exporter;
diff --git a/cpan/Test-Simple/lib/Test/Stream.pm b/cpan/Test-Simple/lib/Test/Stream.pm
index 0690625c95..8ddab7edfe 100644
--- a/cpan/Test-Simple/lib/Test/Stream.pm
+++ b/cpan/Test-Simple/lib/Test/Stream.pm
@@ -2,7 +2,7 @@ package Test::Stream;
use strict;
use warnings;
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Stream::Context qw/context/;
diff --git a/cpan/Test-Simple/lib/Test/Stream/Block.pm b/cpan/Test-Simple/lib/Test/Stream/Block.pm
index 9acb851d81..7f6bd68365 100644
--- a/cpan/Test-Simple/lib/Test/Stream/Block.pm
+++ b/cpan/Test-Simple/lib/Test/Stream/Block.pm
@@ -28,7 +28,16 @@ sub init {
confess "coderef must be a code reference"
unless ref($self->[CODEREF]) && reftype($self->[CODEREF]) eq 'CODE';
- require B;
+ $self->deduce;
+
+ $self->[PARAMS] ||= {};
+}
+
+sub deduce {
+ my $self = shift;
+
+ eval { require B; 1 } || return;
+
my $code = $self->[CODEREF];
my $cobj = B::svref_2object($code);
my $pkg = $cobj->GV->STASH->NAME;
@@ -38,9 +47,8 @@ sub init {
$SUB_MAPS{$file}->{$line} = $self->[NAME];
- $self->[DEDUCED] = [$pkg, $file, $line, $subname];
- $self->[NAME] ||= $subname;
- $self->[PARAMS] ||= {};
+ $self->[DEDUCED] = [$pkg, $file, $line, $subname];
+ $self->[NAME] ||= $subname;
}
sub merge_params {
diff --git a/cpan/Test-Simple/lib/Test/Stream/PackageUtil.pm b/cpan/Test-Simple/lib/Test/Stream/PackageUtil.pm
index 6b871df138..f2a2a8c2de 100644
--- a/cpan/Test-Simple/lib/Test/Stream/PackageUtil.pm
+++ b/cpan/Test-Simple/lib/Test/Stream/PackageUtil.pm
@@ -60,7 +60,8 @@ sub package_purge_sym {
no strict 'refs';
local *GLOBCLONE = *{"$pkg\::$name"};
- undef *{"$pkg\::$name"};
+ my $stash = \%{"${pkg}\::"};
+ delete $stash->{$name};
for my $slot (@SLOTS) {
next if $slot eq $purge;
*{"$pkg\::$name"} = *GLOBCLONE{$slot} if defined *GLOBCLONE{$slot};
diff --git a/cpan/Test-Simple/lib/Test/Tester.pm b/cpan/Test-Simple/lib/Test/Tester.pm
index deb192c413..6f0a44e2fa 100644
--- a/cpan/Test-Simple/lib/Test/Tester.pm
+++ b/cpan/Test-Simple/lib/Test/Tester.pm
@@ -16,7 +16,7 @@ require Exporter;
use vars qw( @ISA @EXPORT $VERSION );
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
@EXPORT = qw( run_tests check_tests check_test cmp_results show_space );
diff --git a/cpan/Test-Simple/lib/Test/use/ok.pm b/cpan/Test-Simple/lib/Test/use/ok.pm
index d241554c85..144d289cf6 100644
--- a/cpan/Test-Simple/lib/Test/use/ok.pm
+++ b/cpan/Test-Simple/lib/Test/use/ok.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
use 5.005;
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Stream 1.301001 '-internal';
diff --git a/cpan/Test-Simple/lib/ok.pm b/cpan/Test-Simple/lib/ok.pm
index d1b23415fe..d96d65e923 100644
--- a/cpan/Test-Simple/lib/ok.pm
+++ b/cpan/Test-Simple/lib/ok.pm
@@ -6,7 +6,7 @@ use Test::Stream 1.301001 '-internal';
use Test::More 1.301001 ();
use Test::Stream::Carp qw/croak/;
-our $VERSION = '1.301001_093';
+our $VERSION = '1.301001_096';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
sub import {
diff --git a/cpan/Test-Simple/t/Test-Stream-Exporter.t b/cpan/Test-Simple/t/Test-Stream-Exporter.t
index 1477867772..6d9097c233 100644
--- a/cpan/Test-Simple/t/Test-Stream-Exporter.t
+++ b/cpan/Test-Simple/t/Test-Stream-Exporter.t
@@ -27,14 +27,6 @@ use Test::More;
is($main::export::xxx, 'here', "still have an \$export::* var");
ok(!__PACKAGE__->can($_), "removed $_\()") for qw/export default_export exports default_exports/;
-
- my $ok = eval {
- export no => sub { 'no' };
- 1;
- };
- my $error = $@;
- ok(!$ok, "Cannot add exports after cleanup");
- like($error, qr/Undefined subroutine &My::Exporter::export called/, "Sub was removed");
}
My::Exporter->import( '!x' );
diff --git a/cpan/Test-Simple/t/Test-Stream-PackageUtil.t b/cpan/Test-Simple/t/Test-Stream-PackageUtil.t
index e55c0f9a4b..76d80d87ed 100644
--- a/cpan/Test-Simple/t/Test-Stream-PackageUtil.t
+++ b/cpan/Test-Simple/t/Test-Stream-PackageUtil.t
@@ -29,10 +29,10 @@ package_purge_sym(__PACKAGE__, CODE => 'foo');
is($foo, 'foo', '$foo is still defined');
is_deeply(\@foo, [ 'f', 'o', 'o' ], '@foo is still defined');
is_deeply(\%foo, { f => 'oo' }, '%foo is still defined');
-my $r = eval { foo() };
+my $r = eval { __PACKAGE__->foo() };
my $e = $@;
ok(!$r, "Failed to call foo()");
-like($e, qr/Undefined subroutine &main::foo called/, "foo() is not defined anymore");
+like($e, qr/Can't locate object method "foo" via package "main"/, "foo() is not defined anymore");
ok(!__PACKAGE__->can('foo'), "can() no longer thinks we can do foo()");
done_testing;