diff options
author | 2021-03-01 23:14:32 +0000 | |
---|---|---|
committer | 2021-03-01 23:14:32 +0000 | |
commit | de8cc8edbc71bd3e3bc7fbffa27ba0e564c37d8b (patch) | |
tree | 5e91ea1711126841ef19ee1ee17705e29dc6baf0 /gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API | |
parent | Update the MSI addresses for the Armada 8040. This chunk will only be (diff) | |
download | wireguard-openbsd-de8cc8edbc71bd3e3bc7fbffa27ba0e564c37d8b.tar.xz wireguard-openbsd-de8cc8edbc71bd3e3bc7fbffa27ba0e564c37d8b.zip |
Import perl-5.32.1
OK sthen@
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API')
4 files changed, 19 insertions, 5 deletions
diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Breakage.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Breakage.pm index ffcf1be582f..2dd2852d0e0 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Breakage.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Breakage.pm @@ -2,7 +2,7 @@ package Test2::API::Breakage; use strict; use warnings; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Test2::Util qw/pkg_to_file/; @@ -73,7 +73,9 @@ sub report { next unless $INC{$file} || ($require && eval { require $file; 1 }); my $want = $suggest{$mod}; next if eval { $mod->VERSION($want); 1 }; - push @warn => " * Module '$mod' is outdated, we recommed updating above $want."; + my $error = $@; + chomp $error; + push @warn => " * Module '$mod' is outdated, we recommed updating above $want. error was: '$error'; INC is $INC{$file}"; } for my $mod (keys %required) { diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Context.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Context.pm index 9cb1cfca723..177d9c40724 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Context.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Context.pm @@ -2,7 +2,7 @@ package Test2::API::Context; use strict; use warnings; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Carp qw/confess croak/; @@ -71,6 +71,8 @@ sub DESTROY { # show the warning about using eq. no warnings 'uninitialized'; if($self->{+EVAL_ERROR} eq $@ && $hub->is_local) { + require Carp; + my $mess = Carp::longmess("Context destroyed"); my $frame = $self->{+_IS_SPAWN} || $self->{+TRACE}->frame; warn <<" EOT"; A context appears to have been destroyed without first calling release(). @@ -87,6 +89,10 @@ release(): Line: $frame->[2] Tool: $frame->[3] +Here is a trace to the code that caused the context to be destroyed, this could +be an exit(), a goto, or simply the end of a scope: +$mess + Cleaning up the CONTEXT stack... EOT } diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Instance.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Instance.pm index 1cf224cf063..fbbb675cc42 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Instance.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Instance.pm @@ -2,7 +2,7 @@ package Test2::API::Instance; use strict; use warnings; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; our @CARP_NOT = qw/Test2::API Test2::API::Instance Test2::IPC::Driver Test2::Formatter/; use Carp qw/confess carp/; diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Stack.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Stack.pm index ffa4ed57f01..d6b6e85c86b 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Stack.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/Stack.pm @@ -2,7 +2,7 @@ package Test2::API::Stack; use strict; use warnings; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Test2::Hub(); @@ -63,6 +63,12 @@ sub all { return @$self; } +sub root { + my $self = shift; + return unless @$self; + return $self->[0]; +} + sub clear { my $self = shift; @$self = (); |