Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/perl5Public

Commit053aa58

Browse files
committed
perldelta for non-ampable CORE::__CLASS__
1 parent0c0c125 commit053aa58

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎pod/perldelta.pod‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,27 @@ manager will later use a regex to expand these into links.
428428

429429
XXX
430430

431+
=item * C<&CORE::__CLASS__> no longer returns invalid results
432+
433+
C<CORE::__CLASS__> would work as expected when used as a bareword or aliased:
434+
435+
use feature qw(class);
436+
class Foo {
437+
BEGIN { *cls = \&CORE::__CLASS__; }
438+
method bar() {
439+
my $class1 = CORE::__CLASS__; # ok
440+
my $class2 = cls; # ok
441+
}
442+
}
443+
444+
But when called with an ampersand (C<&CORE::__CLASS__()>) or through a
445+
reference (C<< my $ref = \&CORE::__CLASS__; $ref->() >>), it would return
446+
unrelated strings. These runtime calls have been fixed to throw an error of the
447+
form C<&CORE::__CLASS__ cannot be called directly> instead of silently
448+
returning incorrect results.
449+
450+
[GH #23737]
451+
431452
=item * C<parse_subsignature()> can now handle empty subroutine signatures
432453

433454
Previously, calling the C<parse_subsignature()> API function with an empty

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp