Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 0dea91e50486151308327956ab4d0b8bfe6e45f8
      
https://github.com/Perl/perl5/commit/0dea91e50486151308327956ab4d0b8bfe6e45f8
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  toke.c: Convert some 'unsigned char' to U8

U8 is the usual spelling, and shorter.


  Commit: 9bad2d8b4880c5ae526722d9ddb24c1038e333f0
      
https://github.com/Perl/perl5/commit/9bad2d8b4880c5ae526722d9ddb24c1038e333f0
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  toke.c: S_intuit_more: Simplify a bit of code


  Commit: 2a82671a9f5369e27e71509b0dd2385dbf86d368
      
https://github.com/Perl/perl5/commit/2a82671a9f5369e27e71509b0dd2385dbf86d368
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Handle easy thing first

This swaps the order of handling a conditional


  Commit: 31583e894ecaa1f6406f3965fddfd0299c92f2d6
      
https://github.com/Perl/perl5/commit/31583e894ecaa1f6406f3965fddfd0299c92f2d6
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: White space only

The previous commit allows this one to outdent things.


  Commit: bb8be86822ffacda034439496b737efd7831f585
      
https://github.com/Perl/perl5/commit/bb8be86822ffacda034439496b737efd7831f585
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Convert 'else if' series to use 'break'

This makes the code simpler.


  Commit: accdcb1dc01bb1d44b5249b3b0eb83d5d6f0247e
      
https://github.com/Perl/perl5/commit/accdcb1dc01bb1d44b5249b3b0eb83d5d6f0247e
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Add a bit more commentary


  Commit: 4354639ac5321a5c1d327625df7f8d430f625902
      
https://github.com/Perl/perl5/commit/4354639ac5321a5c1d327625df7f8d430f625902
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Reserve first byte of buffer

Future commits will want to use this space.


  Commit: c5d1cf338e5c7f69b3c0c352d62e1330b3243306
      
https://github.com/Perl/perl5/commit/c5d1cf338e5c7f69b3c0c352d62e1330b3243306
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Move declaration to first use

And enclose the body for this case in a block, so as to not run afoul of
C++ initialization rules.  Future commits would create more of these.


  Commit: ac673a9b0248ea71325d85d4ed166e089745c2d7
      
https://github.com/Perl/perl5/commit/ac673a9b0248ea71325d85d4ed166e089745c2d7
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Swap order of conditionals

This sees if the variable is a legal identifer before starting to
examine its contents.  This is in preparation for future commits.


  Commit: 644155d81a3ed6f808a700b945cc2ce0b06e9713
      
https://github.com/Perl/perl5/commit/644155d81a3ed6f808a700b945cc2ce0b06e9713
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: White-space only

The previous commit removed a surrounding block from this code


  Commit: 28f5abc31e016f79cc2a45ce76a3bd14c471ac5a
      
https://github.com/Perl/perl5/commit/28f5abc31e016f79cc2a45ce76a3bd14c471ac5a
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Add further validity check

scan_ident returns a length 0 result if something is wrong; check for
that.


  Commit: 3b85b09deef998bde1d4bea5b5d7a67ba83c86c1
      
https://github.com/Perl/perl5/commit/3b85b09deef998bde1d4bea5b5d7a67ba83c86c1
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Use cleaned-up value instead of raw

scan_ident() creates a cleaned-up version of its input.  We do not yet
handle any inputs that need cleaning, but future commits will.  Change
to use that.


  Commit: 52ed04210d56ecffc947fcd7d9df012a598a5a23
      
https://github.com/Perl/perl5/commit/52ed04210d56ecffc947fcd7d9df012a598a5a23
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Punctuation variables are exactly length 1

Not at least 1.


  Commit: 953b7d3ed1f6bafc168c9290eb9a09d0ae949900
      
https://github.com/Perl/perl5/commit/953b7d3ed1f6bafc168c9290eb9a09d0ae949900
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Remove over allocation of buffer

I don't know why the code here uses a buffer 4 times bigger than what is
the maximum an identifier can be.  One might think this is because
Unicode characters can be 4 bytes long, but this number has been in
effect since before Perl knew about Unicode; or maybe it was to avoid
a potential buffer overflow.

But in any event, I'm pretty certain there is no need for that now.  The
buffer is now allocated to handle the maximum Unicode-needed size, and
buffer overflow is checked for and avoided.


  Commit: 2fcfe31e07a4449b7996c083159f406d7ec392e8
      
https://github.com/Perl/perl5/commit/2fcfe31e07a4449b7996c083159f406d7ec392e8
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Save scan_ident return

It returns more than a boolean; save the actual return for use in future
commits


  Commit: 5045258c1b299e7ca942a3fc7657d42020d752e2
      
https://github.com/Perl/perl5/commit/5045258c1b299e7ca942a3fc7657d42020d752e2
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Handle numeric identifiers

This function was totally unaware of the possibility of these.


  Commit: 55dc95c497424fef0f7ee758eaf1a11f1c94a98d
      
https://github.com/Perl/perl5/commit/55dc95c497424fef0f7ee758eaf1a11f1c94a98d
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more; Swap order of conditionals

Do the easier stuff first.


  Commit: 0d658d97cd0e3d8d0d9564edb3d07ffb1a90e63b
      
https://github.com/Perl/perl5/commit/0d658d97cd0e3d8d0d9564edb3d07ffb1a90e63b
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Update list of punctuation variables

'#' and '*' are removed, and missing ones added


  Commit: e5b5ccf877f67366356cbae2bd4e03025158474e
      
https://github.com/Perl/perl5/commit/e5b5ccf877f67366356cbae2bd4e03025158474e
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Look for lexicals, not just globals

This function was written long before lexical variables were introduced,
and not updated to account for them.  Since aa93969e9c1, there has been
a function available to check for the existence of either, and used in
another part of this function since 3450d19250e.

This commit adds its use to the remaining part of the function where it
can help.


  Commit: 3bab8d1649e5b26f4e51e907d5b45429b9d5697e
      
https://github.com/Perl/perl5/commit/3bab8d1649e5b26f4e51e907d5b45429b9d5697e
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  intuit_more: Add finer granularity checks

For cases like parsing

    /^$ary[$A]$/
    /^$ary[${A}]$/

is that $A a character class consisting of '$' and 'A', or is it the
${A}th subscript of @ary?

It is ususally ambiguous.  But this function tries to guess the code's
intent, and this commit increases its accuracy by looking at more
context.

Is there an array @ary or not?  If there is, that leans things to being
an array dereference.  If not, and 'strict vars' is in effect,
it is either a character class or an error.

And is there a variable $A?.  That also should be factored in.  And are
the braces in the second example there to force us to treat A as a
variable, or just happen to be there.

And what about

    /^$ary[$long_variable_name]$/
    /^$ary[${long_variable_name}]$/

If $long_variable_name is an existing variable, it seems more likely
that it is being used as a subscript, and even more so if surrounded by
braces.

This commit sets up a switch statement that handles all possibilities of
3 independent binary variable, hence 8 cases, and ascribes likelihoods
to each combination.


  Commit: 5a263ce5be86b98da0b82c8937eb6301bd4e568f
      
https://github.com/Perl/perl5/commit/5a263ce5be86b98da0b82c8937eb6301bd4e568f
  Author: Karl Williamson <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M toke.c

  Log Message:
  -----------
  Merge branch 'intuit_more fixups' into blead

This series of commits updates a portion of the intuit_more() function
which had not changed as the language evolved.

These commits now consider things like lexical variables and 'use
strict' which the old version did not.


Compare: https://github.com/Perl/perl5/compare/676b5c9be55b...5a263ce5be86

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

Reply via email to