File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,27 @@ manager will later use a regex to expand these into links.
428428
429429XXX
430430
431+ =item * C<&CORE::__CLASS__> no longer returns filenames
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 the
446+ current filename instead. These runtime calls now throw an error of the form
447+ C<&CORE::__CLASS__ cannot be called directly> instead of returning wrong
448+ results.
449+
450+ [GH #23737]
451+
431452=item * C<parse_subsignature()> can now handle empty subroutine signatures
432453
433454Previously, calling the C<parse_subsignature()> API function with an empty
You can’t perform that action at this time.
0 commit comments