Skip to content

Conversation

@khwilliamson
Copy link
Contributor

Fixes #23861

This special case of an all numeric identifier doesn't apply to a multi-component package variable. In "Swish::3::", the 3 is not the first component, and so should not be special cased. Therefore turn off the special handling before looping for a subsequent component.

In d2a0fb8, I moved some code into a called function, adding a flag for the function to specially treat this case as the caller had done. It was my intent that there be no change in behavior. But, the called function differs from the original, in that it can loop, gathering each component of a package variable. I overlooked that possibility, and our test suite lacked a test for this situation.

The called function is not an exact fit with what the caller did; hence the new flag. But it had enough overlap that it avoided some duplication of code; and allowed for the caller to be simplified. And there is another case in the caller that repeated nearly duplicate code so that a later commit changed to use this function, further simplifying things.

  • This set of changes does not require a perldelta entry.

Fixes Perl#23861

This special case of an all numeric identifier doesn't apply to a
multi-component package variable.  In "Swish::3::", the 3 is not the
first component, and so should not be special cased.  Therefore turn off
the special handling before looping for a subsequent component.

In d2a0fb8, I moved some code into a
called function, adding a flag for the function to specially treat this
case as the caller had done.  It was my intent that there be no change
in behavior.  The called function differs from the original, in that it
can loop, gathering each component of a package variable.  I overlooked
that case, and our test suite lacked a test for this situation.

The called function is not an exact fit with what the caller did; hence
the new flag.  But it had enough overlap that it avoided some
duplication of code; and allowed for the caller to be simplified.  And
there is another case in the caller that repeated nearly duplicate code
so that a later commit changed to use this function, further simplifying
things.
@khwilliamson khwilliamson merged commit 1d3e75e into Perl:blead Oct 19, 2025
34 checks passed
@khwilliamson khwilliamson deleted the fix_parse_ident branch October 22, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BBC: Blead Breaks SWISH::3

2 participants