Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

op/sub.t - state variable not working #56

Open
@toddr

Description

@toddr

Should print ok...

sub predeclared {
    CORE::state $x = 42;
    sub inside_predeclared {
	eval '$x' eq 42 and print "ok\n";
    }
}
predeclared(); # set $x to 42
$main::x = $main::x = "You should not see this.";
inside_predeclared(); # run test

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions