Skip Menu |

This queue is for tickets about the Test-Leaner CPAN distribution.

Report information
The Basics
Id: 124250
Status: new
Priority: 0/
Queue: Test-Leaner

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Compatibility with CV-in-stash optimisation
See attachment.
Subject: open_O6LNx8ua.txt
diff -rup Test-Leaner-0.05-0-orig/lib/Test/Leaner.pm Test-Leaner-0.05-0/lib/Test/Leaner.pm --- Test-Leaner-0.05-0-orig/lib/Test/Leaner.pm 2013-08-24 12:16:52.000000000 -0700 +++ Test-Leaner-0.05-0/lib/Test/Leaner.pm 2018-01-28 16:27:56.000000000 -0800 @@ -168,7 +168,10 @@ if ($ENV{PERL_TEST_LEANER_USES_TEST_MORE my %stubbed; for (@EXPORT) { - my $replacement = exists $more_stash->{$_} ? *{$more_stash->{$_}}{CODE} + my $replacement = exists $more_stash->{$_} ? ref $more_stash->{$_} + eq 'CODE' + ? $more_stash->{$_} + : *{$more_stash->{$_}}{CODE} : undef; unless (defined $replacement) { $stubbed{$_}++; diff -rup Test-Leaner-0.05-0-orig/t/lib/Test/Leaner/TestImport.pm Test-Leaner-0.05-0/t/lib/Test/Leaner/TestImport.pm --- Test-Leaner-0.05-0-orig/t/lib/Test/Leaner/TestImport.pm 2013-08-24 11:17:10.000000000 -0700 +++ Test-Leaner-0.05-0/t/lib/Test/Leaner/TestImport.pm 2018-01-28 16:28:35.000000000 -0800 @@ -14,7 +14,7 @@ sub get_subroutine { my $glob = $stash->{$name}; return undef unless $glob; - return *$glob{CODE}; + return ref $glob eq 'CODE' ? $glob : *$glob{CODE}; } sub has_module_version {