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.

compile-time re-eval count is not saved correctly #75

Open
@atoomic

Description

@atoomic

This is an extract from t/split.t in the perl 5.26.0 test suite. ( the test can also be run under perl 5.24 )

When using 'our', the compiled version provides the same behavior as the uncompiled one.
With 'my' the value is incorrect once compiled

# uncompiled
> perl524 -e 'our $c = 0; @a = split /-(?{ $c++ })/, "a-b-c"; print qq[$c\n];'
2
> perl524 -e 'my $c = 0; @a = split /-(?{ $c++ })/, "a-b-c"; print qq[$c\n];'
2
# compiled
> perlcc -r -e 'our $c = 0; @a = split /-(?{ $c++ })/, "a-b-c"; print qq[$c\n];'
2
> perlcc -r -e 'my $c = 0; @a = split /-(?{ $c++ })/, "a-b-c"; print qq[$c\n];'
0

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