summaryrefslogtreecommitdiff
path: root/cpan/Test-Simple/lib/Test2/API/Instance.pm
diff options
context:
space:
mode:
authorChad Granum <exodist7@gmail.com>2016-06-07 08:04:02 -0700
committerJames E Keenan <jkeenan@cpan.org>2016-06-07 21:11:17 -0400
commitc6a6e1c8da974f7737a2fe6ac1e8fbd68546d67c (patch)
tree974b2bb53bd89e97d6e8f82f2308050dfa3bf633 /cpan/Test-Simple/lib/Test2/API/Instance.pm
parent514e62e37b812971a6aecaf30b28be6f6c8498b8 (diff)
downloadperl-c6a6e1c8da974f7737a2fe6ac1e8fbd68546d67c.tar.gz
Update to Test-Simple 1.302026
- Fix SHM leak - Update Porting/Maintainers.pl
Diffstat (limited to 'cpan/Test-Simple/lib/Test2/API/Instance.pm')
-rw-r--r--cpan/Test-Simple/lib/Test2/API/Instance.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/cpan/Test-Simple/lib/Test2/API/Instance.pm b/cpan/Test-Simple/lib/Test2/API/Instance.pm
index e97e4a2aa1..8938040e0b 100644
--- a/cpan/Test-Simple/lib/Test2/API/Instance.pm
+++ b/cpan/Test-Simple/lib/Test2/API/Instance.pm
@@ -2,7 +2,7 @@ package Test2::API::Instance;
use strict;
use warnings;
-our $VERSION = '1.302022';
+our $VERSION = '1.302026';
our @CARP_NOT = qw/Test2::API Test2::API::Instance Test2::IPC::Driver Test2::Formatter/;
@@ -270,6 +270,9 @@ sub add_ipc_driver {
sub enable_ipc_polling {
my $self = shift;
+ $self->{+_PID} = $$ unless defined $self->{+_PID};
+ $self->{+_TID} = get_tid() unless defined $self->{+_TID};
+
$self->add_context_init_callback(
# This is called every time a context is created, it needs to be fast.
# $_[0] is a context object
@@ -297,6 +300,9 @@ sub ipc_enable_shm {
return 1 if defined $self->{+IPC_SHM_ID};
+ $self->{+_PID} = $$ unless defined $self->{+_PID};
+ $self->{+_TID} = get_tid() unless defined $self->{+_TID};
+
my ($ok, $err) = try {
require IPC::SysV;
@@ -487,8 +493,7 @@ This is not a supported configuration, you will have problems.
$new_exit = 255 if $new_exit > 255;
- if ($new_exit) {
- require Test2::API::Breakage;
+ if ($new_exit && eval { require Test2::API::Breakage; 1 }) {
my @warn = Test2::API::Breakage->report();
if (@warn) {