Skip to content

Class ADJUST block breaks module_true feature #23758

@JRaspass

Description

@JRaspass
use v5.38;
use experimental 'class';

class Foo;

ADJUST {}
$ perl -I. -MFoo -e 1
Foo.pm did not return a true value.
BEGIN failed--compilation aborted

Wrapping the class in a block, adding a true value, adding methods or fields all "fix" this but I would've expected this to work.

It's not even that contrived, it came up while I was prototyping something at $work and I had a subclass that just did :isa(BaseClass) and then only needed to ADJUST a few fields.

Metadata

Metadata

Assignees

Labels

BugclassIssues related to 'class' keyword or __CLASS__

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions