Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 09df855

Browse files
committed
NEXT-0.67_01
1 parent ff85b94 commit 09df855

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

cpan/NEXT/lib/NEXT.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use warnings;
66
use overload ();
77

8-
our $VERSION = '0.67';
8+
our $VERSION = '0.67_01';
99

1010
sub NEXT::ELSEWHERE::ancestors
1111
{
@@ -64,17 +64,19 @@ sub NEXT::ELSEWHERE::buildAUTOLOAD
6464
last if shift @forebears eq $caller_class
6565
}
6666
no strict 'refs';
67+
# Use *{"..."} when first accessing the CODE slot, to make sure
68+
# any typeglob stub is upgraded to a full typeglob.
6769
@{$NEXT::NEXT{$key,$wanted_method}} =
6870
map {
6971
my $stash = \%{"${_}::"};
70-
($stash->{$caller_method} && (*{$stash->{$caller_method}}{CODE}))
72+
($stash->{$caller_method} && (*{"${_}::$caller_method"}{CODE}))
7173
? *{$stash->{$caller_method}}{CODE}
7274
: () } @forebears
7375
unless $wanted_method eq 'AUTOLOAD';
7476
@{$NEXT::NEXT{$key,$wanted_method}} =
7577
map {
7678
my $stash = \%{"${_}::"};
77-
($stash->{AUTOLOAD} && (*{$stash->{AUTOLOAD}}{CODE}))
79+
($stash->{AUTOLOAD} && (*{"${_}::AUTOLOAD"}{CODE}))
7880
? "${_}::AUTOLOAD"
7981
: () } @forebears
8082
unless @{$NEXT::NEXT{$key,$wanted_method}||[]};

cpan/NEXT/t/next.t

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
BEGIN { print "1..26\n"; }
1+
BEGIN { print "1..27\n"; }
22

33
use NEXT;
44

@@ -16,13 +16,13 @@ sub B::AUTOLOAD { return ( 9, $_[0]->NEXT::AUTOLOAD() )
1616
sub B::DESTROY { $_[0]->NEXT::DESTROY() }
1717

1818
package C;
19-
sub C::DESTROY { print "ok 24\n"; $_[0]->NEXT::DESTROY() }
19+
sub C::DESTROY { print "ok 25\n"; $_[0]->NEXT::DESTROY() }
2020

2121
package D;
2222
@D::ISA = qw( B C E );
2323
sub D::method { return ( 2, $_[0]->NEXT::method() ) }
2424
sub D::AUTOLOAD { return ( 8, $_[0]->NEXT::AUTOLOAD() ) }
25-
sub D::DESTROY { print "ok 23\n"; $_[0]->NEXT::DESTROY() }
25+
sub D::DESTROY { print "ok 24\n"; $_[0]->NEXT::DESTROY() }
2626
sub D::oops { $_[0]->NEXT::method() }
2727
sub D::secondary { return ( 17, 18, map { $_+10 } $_[0]->NEXT::secondary() ) }
2828

@@ -31,12 +31,12 @@ package E;
3131
sub E::method { return ( 4, $_[0]->NEXT::method(), $_[0]->NEXT::method() ) }
3232
sub E::AUTOLOAD { return ( 10, $_[0]->NEXT::AUTOLOAD() )
3333
if $AUTOLOAD =~ /.*(missing_method|secondary)/ }
34-
sub E::DESTROY { print "ok 25\n"; $_[0]->NEXT::DESTROY() }
34+
sub E::DESTROY { print "ok 26\n"; $_[0]->NEXT::DESTROY() }
3535

3636
package F;
3737
sub F::method { return ( 5 ) }
3838
sub F::AUTOLOAD { return ( 11 ) if $AUTOLOAD =~ /.*(missing_method|secondary)/ }
39-
sub F::DESTROY { print "ok 26\n" }
39+
sub F::DESTROY { print "ok 27\n" }
4040

4141
package G;
4242
sub G::method { return ( 6 ) }
@@ -104,4 +104,15 @@ eval {
104104
};
105105
print "ok 22\n";
106106

107-
# CAN REDISPATCH DESTRUCTORS (ok 23..26)
107+
# TEST WITH CONSTANTS (23)
108+
109+
package Hay;
110+
@ISA = 'Bee';
111+
sub foo { return shift->NEXT::foo }
112+
package Bee;
113+
use constant foo => 3;
114+
package main;
115+
print "not " unless Hay->foo eq '3';
116+
print "ok 23\n";
117+
118+
# CAN REDISPATCH DESTRUCTORS (ok 24..27)

dist/Module-CoreList/lib/Module/CoreList.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17555,6 +17555,7 @@ our %delta = (
1755517555
'IO::Uncompress::Unzip' => '2.081',
1755617556
'IPC::Cmd' => '1.02',
1755717557
'Net::Ping' => '2.70',
17558+
'NEXT' => '0.67_01',
1755817559
'List::Util' => '1.50_11',
1755917560
'List::Util::XS' => '1.50_11',
1756017561
'Scalar::Util' => '1.50_11',

pod/perlcdelta.pod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,10 @@ use NIx_NOSERV flag for windows.
426426

427427
better icmpv6 support.
428428

429+
=item L<NEXT> 0.67_01
430+
431+
Fix for GLOB stubs [cpan #123002].
432+
429433
=item Scalar-List-Util 1.50_11
430434

431435
fix C<find_rundefsvoffset> logic.

0 commit comments

Comments
 (0)