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

&CORE::__CLASS__ returns bogus value (filename) #23737

Closed
@mauke

Description

@mauke

Description

&CORE::__CLASS__ should either fail cleanly (Undefined subroutine &CORE::__CLASS__ called or similar) or work and return a class name. Instead it returns the caller's filename.

Steps to Reproduce

use v5.36;use experimentalqw(class);class Foo {    method f1() { __CLASS__}    method f2() { &CORE::__CLASS__() }    method f3() { \&CORE::__CLASS__ }}my$o = Foo->new;say$o->f1;say$o->f2;say$o->f3->();

Output:

Foobug.plbug.pl

Expected behavior

FooFooFoo

... actually I'm not sure about the third one. I think that ought to be a runtime error, maybe?

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp