In perl.git, the branch smoke-me/tonyc/133850-sublex-print-fh has been created

<https://perl5.git.perl.org/perl.git/commitdiff/aa7eb33b9c346e654ba80df586838f7fe2de759b?hp=0000000000000000000000000000000000000000>

        at  aa7eb33b9c346e654ba80df586838f7fe2de759b (commit)

- Log -----------------------------------------------------------------
commit aa7eb33b9c346e654ba80df586838f7fe2de759b
Author: Tony Cook <t...@develop-help.com>
Date:   Wed May 29 14:37:25 2019 +1000

    (perl #133850) allow attributes in sub-parses

commit 9a51fa1162df8670c4d269fafcab5e8e2e022d9f
Author: Tony Cook <t...@develop-help.com>
Date:   Wed May 29 13:47:36 2019 +1000

    (perl #133850) allow @x{...} with space in sub-parse

commit a70d6d390e693ab38718eb0fd9c596718d3be44d
Author: Tony Cook <t...@develop-help.com>
Date:   Wed May 29 11:46:01 2019 +1000

    (perl #133850) warn on ${time} even in sub-parse
    
    Code like:
    
      $a = ${time}
    
    warns with:
    
      Ambiguous use of ${time} resolved to $time at ...
    
    but:
    
      s/^/ ${time} /e
    
    didn't, since the parser is in a special state in sub-parses.

commit 7f0083d84337708ff3812d061db275aeb6ae7dbd
Author: Tony Cook <t...@develop-help.com>
Date:   Tue Feb 19 15:38:39 2019 +1100

    (perl #133850) fix parsing hints for print $fh "foo" in s///e
    
    The replacement code in s///e is parsed using a sublex, similarly
    to double-quotish replacement.
    
    The code that handles C< $id > tries to detect what the next token
    should be, but only special cased code similar to C< print $fh ... >
    in a non-sublex, so s/../print $fh $1/e set PL_expect to XOPERATOR
    which caused the parser to complain when the $1 wasn't an operator.
    
    The fix here handles two cases:
    
     s/.../code here/e
    
    In this case the code is inserted into a do {} block like:
    
      do { code here }
    
    so PL_lex_brackets ends up non-zero.
    
    The second case is code like:
    
      "xxx${code here}"
    
    which had the same problem, which this also fixes.

-----------------------------------------------------------------------

-- 
Perl5 Master Repository

Reply via email to