Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 1d3e75ef796d621ee46b8581832b24002d46df2a
      
https://github.com/Perl/perl5/commit/1d3e75ef796d621ee46b8581832b24002d46df2a
  Author: Karl Williamson <[email protected]>
  Date:   2025-10-19 (Sun, 19 Oct 2025)

  Changed paths:
    M t/comp/parser.t
    M toke.c

  Log Message:
  -----------
  S_parse_ident: Apply flag only to first loop iteration

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 d2a0fb8c48c5baf9b54f467909b3ff0c824cf26e, 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.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to