Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-XS-Parse-Keyword for 
openSUSE:Factory checked in at 2022-03-01 17:03:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XS-Parse-Keyword (Old)
 and      /work/SRC/openSUSE:Factory/.perl-XS-Parse-Keyword.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-XS-Parse-Keyword"

Tue Mar  1 17:03:59 2022 rev:5 rq:958274 version:0.22

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-XS-Parse-Keyword/perl-XS-Parse-Keyword.changes  
    2021-10-23 00:52:16.209155625 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-XS-Parse-Keyword.new.1958/perl-XS-Parse-Keyword.changes
    2022-03-01 17:04:49.092353333 +0100
@@ -1,0 +2,6 @@
+Tue Feb 22 03:08:54 UTC 2022 - Tina M??ller <timueller+p...@suse.de>
+
+- updated to 0.22
+   see /usr/share/doc/packages/perl-XS-Parse-Keyword/Changes
+
+-------------------------------------------------------------------

Old:
----
  XS-Parse-Keyword-0.21.tar.gz

New:
----
  XS-Parse-Keyword-0.22.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-XS-Parse-Keyword.spec ++++++
--- /var/tmp/diff_new_pack.9DepRV/_old  2022-03-01 17:04:49.576353462 +0100
+++ /var/tmp/diff_new_pack.9DepRV/_new  2022-03-01 17:04:49.580353463 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-XS-Parse-Keyword
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,10 +18,10 @@
 
 %define cpan_name XS-Parse-Keyword
 Name:           perl-XS-Parse-Keyword
-Version:        0.21
+Version:        0.22
 Release:        0
-Summary:        XS functions to assist in parsing keyword syntax
 License:        Artistic-1.0 OR GPL-1.0-or-later
+Summary:        XS functions to assist in parsing keyword syntax
 URL:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
@@ -29,6 +29,7 @@
 BuildRequires:  perl-macros
 BuildRequires:  perl(ExtUtils::CBuilder)
 BuildRequires:  perl(ExtUtils::CChecker) >= 0.11
+BuildRequires:  perl(ExtUtils::ParseXS) >= 3.16
 BuildRequires:  perl(Module::Build) >= 0.400400
 BuildRequires:  perl(Test::More) >= 0.88
 %{perl_requires}

++++++ XS-Parse-Keyword-0.21.tar.gz -> XS-Parse-Keyword-0.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/Build.PL 
new/XS-Parse-Keyword-0.22/Build.PL
--- old/XS-Parse-Keyword-0.21/Build.PL  2021-10-12 10:55:54.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/Build.PL  2022-02-21 22:38:00.000000000 +0100
@@ -46,7 +46,7 @@
 
 int main(void) { struct Perl_custom_infix def; return 0; }
 EOF
-   ) if $] >= 5.035005;
+   ) if $] >= 5.035010;
 
    if( $have_pl_infix_plugin ) {
       print "Including support for core perl PL_infix_plugin\n";
@@ -61,6 +61,13 @@
    requires => {
       'perl' => $MIN_PERL,
    },
+   build_requires => {
+      # We have multiple t/*.xs files, which requires a new enough version of
+      # ExtUtils::ParseXS to cope with.
+      # Unsure the exact version required. perl 5.14 normally ships with 
version
+      # 2.2210 but that fails. perl 5.16's version 3.16 works fine.
+      'ExtUtils::ParseXS' => '3.16',
+   },
    test_requires => {
       'Test::More' => '0.88', # done_testing
    },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/Changes 
new/XS-Parse-Keyword-0.22/Changes
--- old/XS-Parse-Keyword-0.21/Changes   2021-10-12 10:55:54.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/Changes   2022-02-21 22:38:00.000000000 +0100
@@ -1,9 +1,19 @@
 Revision history for XS-Parse-Keyword
 
-0.20    2021-10-11
+0.22    2022-02-21
+        [CHANGES]
+         * Added XPK_AUTOSEMI piece type
+
+        [BUGFIXES]
+         * Don't segfault if lex_scan_lexvar() fails (RT140402)
+         * Set required version of ExtUtils::ParseXS for multiple t/*.xs files
+
+0.21    2021-10-12
         [BUGFIXES]
          * Fix for perl 5.20 - cannot use assert() as an expression
 
+0.20    (bad MANIFEST)
+
 0.19    2021-10-05
         [CHANGES]
          * Defined XPK_PREFIXED_BLOCK_ENTERLEAVE and XPK_SETUP for customizing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/LICENSE 
new/XS-Parse-Keyword-0.22/LICENSE
--- old/XS-Parse-Keyword-0.21/LICENSE   2021-10-12 10:55:54.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/LICENSE   2022-02-21 22:38:00.000000000 +0100
@@ -1,4 +1,4 @@
-This software is copyright (c) 2021 by Paul Evans <leon...@leonerd.org.uk>.
+This software is copyright (c) 2022 by Paul Evans <leon...@leonerd.org.uk>.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2021 by Paul Evans <leon...@leonerd.org.uk>.
+This software is Copyright (c) 2022 by Paul Evans <leon...@leonerd.org.uk>.
 
 This is free software, licensed under:
 
@@ -272,7 +272,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2021 by Paul Evans <leon...@leonerd.org.uk>.
+This software is Copyright (c) 2022 by Paul Evans <leon...@leonerd.org.uk>.
 
 This is free software, licensed under:
 
@@ -292,21 +292,21 @@
 
   - "Package" refers to the collection of files distributed by the Copyright
     Holder, and derivatives of that collection of files created through
-    textual modification. 
+    textual modification.
   - "Standard Version" refers to such a Package if it has not been modified,
     or has been modified in accordance with the wishes of the Copyright
-    Holder. 
+    Holder.
   - "Copyright Holder" is whoever is named in the copyright or copyrights for
-    the package. 
+    the package.
   - "You" is you, if you're thinking about copying or distributing this 
Package.
   - "Reasonable copying fee" is whatever you can justify on the basis of media
     cost, duplication charges, time of people involved, and so on. (You will
     not be required to justify it to the Copyright Holder, but only to the
-    computing community at large as a market that must bear the fee.) 
+    computing community at large as a market that must bear the fee.)
   - "Freely Available" means that no fee is charged for the item itself, though
     there may be fees involved in handling the item. It also means that
     recipients of the item may redistribute it under the same conditions they
-    received it. 
+    received it.
 
 1. You may make and give away verbatim copies of the source form of the
 Standard Version of this Package without restriction, provided that you
@@ -373,7 +373,7 @@
 
 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 The End
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/MANIFEST 
new/XS-Parse-Keyword-0.22/MANIFEST
--- old/XS-Parse-Keyword-0.21/MANIFEST  2021-10-12 10:55:54.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/MANIFEST  2022-02-21 22:38:00.000000000 +0100
@@ -16,11 +16,7 @@
 lib/XS/Parse/Keyword.xs
 lib/XS/Parse/Keyword/Builder.pm
 lib/XS/Parse/Keyword/Builder_data.pm.PL
-LICENSE
 MANIFEST                       This list of files
-META.json
-META.yml
-README
 src/infix.c
 src/infix.h
 src/keyword.c
@@ -58,3 +54,7 @@
 t/testcase.pm
 XSParseInfix.h
 XSParseKeyword.h
+README
+LICENSE
+META.yml
+META.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/META.json 
new/XS-Parse-Keyword-0.22/META.json
--- old/XS-Parse-Keyword-0.21/META.json 2021-10-12 10:55:54.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/META.json 2022-02-21 22:38:00.000000000 +0100
@@ -16,7 +16,8 @@
    "prereqs" : {
       "build" : {
          "requires" : {
-            "ExtUtils::CBuilder" : "0"
+            "ExtUtils::CBuilder" : "0",
+            "ExtUtils::ParseXS" : "3.16"
          }
       },
       "configure" : {
@@ -39,19 +40,19 @@
    "provides" : {
       "XS::Parse::Infix" : {
          "file" : "lib/XS/Parse/Infix.pm",
-         "version" : "0.21"
+         "version" : "0.22"
       },
       "XS::Parse::Infix::Builder" : {
          "file" : "lib/XS/Parse/Infix/Builder.pm",
-         "version" : "0.21"
+         "version" : "0.22"
       },
       "XS::Parse::Keyword" : {
          "file" : "lib/XS/Parse/Keyword.pm",
-         "version" : "0.21"
+         "version" : "0.22"
       },
       "XS::Parse::Keyword::Builder" : {
          "file" : "lib/XS/Parse/Keyword/Builder.pm",
-         "version" : "0.21"
+         "version" : "0.22"
       }
    },
    "release_status" : "stable",
@@ -60,6 +61,6 @@
          "http://dev.perl.org/licenses/";
       ]
    },
-   "version" : "0.21",
-   "x_serialization_backend" : "JSON::PP version 4.05"
+   "version" : "0.22",
+   "x_serialization_backend" : "JSON::PP version 4.06"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/META.yml 
new/XS-Parse-Keyword-0.22/META.yml
--- old/XS-Parse-Keyword-0.21/META.yml  2021-10-12 10:55:54.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/META.yml  2022-02-21 22:38:00.000000000 +0100
@@ -4,6 +4,7 @@
   - 'Paul Evans <leon...@leonerd.org.uk>'
 build_requires:
   ExtUtils::CBuilder: '0'
+  ExtUtils::ParseXS: '3.16'
   Test::More: '0.88'
 configure_requires:
   ExtUtils::CChecker: '0.11'
@@ -18,19 +19,19 @@
 provides:
   XS::Parse::Infix:
     file: lib/XS/Parse/Infix.pm
-    version: '0.21'
+    version: '0.22'
   XS::Parse::Infix::Builder:
     file: lib/XS/Parse/Infix/Builder.pm
-    version: '0.21'
+    version: '0.22'
   XS::Parse::Keyword:
     file: lib/XS/Parse/Keyword.pm
-    version: '0.21'
+    version: '0.22'
   XS::Parse::Keyword::Builder:
     file: lib/XS/Parse/Keyword/Builder.pm
-    version: '0.21'
+    version: '0.22'
 requires:
   perl: '5.014'
 resources:
   license: http://dev.perl.org/licenses/
-version: '0.21'
+version: '0.22'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/README 
new/XS-Parse-Keyword-0.22/README
--- old/XS-Parse-Keyword-0.21/README    2021-10-12 10:55:54.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/README    2022-02-21 22:38:00.000000000 +0100
@@ -380,6 +380,20 @@
     A literal character (,, : or =) is expected. No argument value is
     passed.
 
+ XPK_AUTOSEMI
+
+    atomic, emits nothing.
+
+    A literal semicolon (;) as a statement terminator is optionally
+    expected. If the next token is a closing brace to indicate the end of a
+    block, then a semicolon is not required. If anything else is
+    encountered an error will be raised.
+
+    This piece type is the same as specifying the XPK_FLAG_AUTOSEMI. It is
+    useful to put at the end of a sequence that forms part of a choice of
+    syntax, where some forms indicate a statement ending in a semicolon,
+    whereas others may end in a full block that does not need one.
+
  XPK_INFIX_*
 
     atomic, can probe, emits infix.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/XSParseKeyword.h 
new/XS-Parse-Keyword-0.22/XSParseKeyword.h
--- old/XS-Parse-Keyword-0.21/XSParseKeyword.h  2021-10-12 10:55:54.000000000 
+0200
+++ new/XS-Parse-Keyword-0.22/XSParseKeyword.h  2022-02-21 22:38:00.000000000 
+0100
@@ -26,6 +26,7 @@
   /*                                    emits */
   XS_PARSE_KEYWORD_LITERALCHAR = 1,   /* nothing */
   XS_PARSE_KEYWORD_LITERALSTR,        /* nothing */
+  XS_PARSE_KEYWORD_AUTOSEMI,          /* nothing */
   XS_PARSE_KEYWORD_FAILURE = 0x0f,    /* nothing */
 
   XS_PARSE_KEYWORD_BLOCK = 0x10,      /* op */
@@ -119,6 +120,7 @@
 
 #define XPK_LITERAL(s) {.type = XS_PARSE_KEYWORD_LITERALSTR, .u.str = (const 
char *)s}
 #define XPK_STRING(s)  XPK_LITERAL(s)
+#define XPK_AUTOSEMI   {.type = XS_PARSE_KEYWORD_AUTOSEMI}
 
 #define XPK_INFIX(select) {.type = XS_PARSE_KEYWORD_INFIX, .u.c = select}
 #define XPK_INFIX_RELATION       XPK_INFIX(XPI_SELECT_RELATION)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/lib/XS/Parse/Infix/Builder.pm 
new/XS-Parse-Keyword-0.22/lib/XS/Parse/Infix/Builder.pm
--- old/XS-Parse-Keyword-0.21/lib/XS/Parse/Infix/Builder.pm     2021-10-12 
10:55:55.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/lib/XS/Parse/Infix/Builder.pm     2022-02-21 
22:38:00.000000000 +0100
@@ -3,7 +3,7 @@
 #
 #  (C) Paul Evans, 2021 -- leon...@leonerd.org.uk
 
-package XS::Parse::Infix::Builder 0.21;
+package XS::Parse::Infix::Builder 0.22;
 
 use v5.14;
 use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/XS-Parse-Keyword-0.21/lib/XS/Parse/Infix/Builder_data.pm.PL 
new/XS-Parse-Keyword-0.22/lib/XS/Parse/Infix/Builder_data.pm.PL
--- old/XS-Parse-Keyword-0.21/lib/XS/Parse/Infix/Builder_data.pm.PL     
2021-10-12 10:55:55.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/lib/XS/Parse/Infix/Builder_data.pm.PL     
2022-02-21 22:38:00.000000000 +0100
@@ -28,7 +28,7 @@
    <$in_h> } );
 
 __DATA__
-package XS::Parse::Infix::Builder_data 0.21;
+package XS::Parse::Infix::Builder_data 0.22;
 
 use v5.14;
 use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/lib/XS/Parse/Infix.pm 
new/XS-Parse-Keyword-0.22/lib/XS/Parse/Infix.pm
--- old/XS-Parse-Keyword-0.21/lib/XS/Parse/Infix.pm     2021-10-12 
10:55:55.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/lib/XS/Parse/Infix.pm     2022-02-21 
22:38:00.000000000 +0100
@@ -3,7 +3,7 @@
 #
 #  (C) Paul Evans, 2021 -- leon...@leonerd.org.uk
 
-package XS::Parse::Infix 0.21;
+package XS::Parse::Infix 0.22;
 
 use v5.14;
 use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/XS-Parse-Keyword-0.21/lib/XS/Parse/Keyword/Builder.pm 
new/XS-Parse-Keyword-0.22/lib/XS/Parse/Keyword/Builder.pm
--- old/XS-Parse-Keyword-0.21/lib/XS/Parse/Keyword/Builder.pm   2021-10-12 
10:55:55.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/lib/XS/Parse/Keyword/Builder.pm   2022-02-21 
22:38:00.000000000 +0100
@@ -3,7 +3,7 @@
 #
 #  (C) Paul Evans, 2021 -- leon...@leonerd.org.uk
 
-package XS::Parse::Keyword::Builder 0.21;
+package XS::Parse::Keyword::Builder 0.22;
 
 use v5.14;
 use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/XS-Parse-Keyword-0.21/lib/XS/Parse/Keyword/Builder_data.pm.PL 
new/XS-Parse-Keyword-0.22/lib/XS/Parse/Keyword/Builder_data.pm.PL
--- old/XS-Parse-Keyword-0.21/lib/XS/Parse/Keyword/Builder_data.pm.PL   
2021-10-12 10:55:55.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/lib/XS/Parse/Keyword/Builder_data.pm.PL   
2022-02-21 22:38:00.000000000 +0100
@@ -28,7 +28,7 @@
    <$in_h> } );
 
 __DATA__
-package XS::Parse::Keyword::Builder_data 0.21;
+package XS::Parse::Keyword::Builder_data 0.22;
 
 use v5.14;
 use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/lib/XS/Parse/Keyword.pm 
new/XS-Parse-Keyword-0.22/lib/XS/Parse/Keyword.pm
--- old/XS-Parse-Keyword-0.21/lib/XS/Parse/Keyword.pm   2021-10-12 
10:55:55.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/lib/XS/Parse/Keyword.pm   2022-02-21 
22:38:00.000000000 +0100
@@ -1,9 +1,9 @@
 #  You may distribute under the terms of either the GNU General Public License
 #  or the Artistic License (the same terms as Perl itself)
 #
-#  (C) Paul Evans, 2021 -- leon...@leonerd.org.uk
+#  (C) Paul Evans, 2021-2022 -- leon...@leonerd.org.uk
 
-package XS::Parse::Keyword 0.21;
+package XS::Parse::Keyword 0.22;
 
 use v5.14;
 use warnings;
@@ -394,6 +394,20 @@
 
 A literal character (C<,>, C<:> or C<=>) is expected. No argument value is 
passed.
 
+=head2 XPK_AUTOSEMI
+
+I<atomic, emits nothing.>
+
+A literal semicolon (C<;>) as a statement terminator is optionally expected.
+If the next token is a closing brace to indicate the end of a block, then a
+semicolon is not required. If anything else is encountered an error will be
+raised.
+
+This piece type is the same as specifying the C<XPK_FLAG_AUTOSEMI>. It is
+useful to put at the end of a sequence that forms part of a choice of syntax,
+where some forms indicate a statement ending in a semicolon, whereas others
+may end in a full block that does not need one.
+
 =head2 XPK_INFIX_*
 
 I<atomic, can probe, emits infix.>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/src/keyword.c 
new/XS-Parse-Keyword-0.22/src/keyword.c
--- old/XS-Parse-Keyword-0.21/src/keyword.c     2021-10-12 10:55:55.000000000 
+0200
+++ new/XS-Parse-Keyword-0.22/src/keyword.c     2022-02-21 22:38:00.000000000 
+0100
@@ -1,7 +1,7 @@
 /*  You may distribute under the terms of either the GNU General Public License
  *  or the Artistic License (the same terms as Perl itself)
  *
- *  (C) Paul Evans, 2021 -- leon...@leonerd.org.uk
+ *  (C) Paul Evans, 2021-2022 -- leon...@leonerd.org.uk
  */
 
 #define PERL_NO_GET_CONTEXT
@@ -109,6 +109,18 @@
   lex_read_to(PL_parser->bufptr + len);
 }
 
+#define parse_autosemi()  MY_parse_autosemi(aTHX)
+void MY_parse_autosemi(pTHX)
+{
+  int c = lex_peek_unichar(0);
+  if(c == ';')
+    lex_read_unichar(0);
+  else if(!c || c == '}')
+    ; /* all is good */
+  else
+    yycroak("Expected: ';' or end of block");
+}
+
 struct Registration;
 struct Registration {
   struct Registration *next;
@@ -363,6 +375,10 @@
       lex_expect_str(piece->u.str);
       return;
 
+    case XS_PARSE_KEYWORD_AUTOSEMI:
+      parse_autosemi();
+      return;
+
     case XS_PARSE_KEYWORD_FAILURE:
       yycroak(piece->u.str);
       NOT_REACHED;
@@ -494,6 +510,8 @@
     {
       /* name vs. padix begin with similar structure */
       SV *varname = lex_scan_lexvar();
+      if(!varname)
+        yycroak("Expected a lexical variable name");
       switch(SvPVX(varname)[0]) {
         case '$':
           if(!(piece->u.c & XPK_LEXVAR_SCALAR))
@@ -731,13 +749,7 @@
   if(hooks->flags & XPK_FLAG_AUTOSEMI) {
     lex_read_space(0);
 
-    int c = lex_peek_unichar(0);
-    if(c == ';')
-      lex_read_unichar(0);
-    else if(!c || c == '}')
-      ; /* all is good */
-    else
-      yycroak("Expected: ';' or end of block");
+    parse_autosemi();
   }
 
   XSParseKeywordPiece *args = (XSParseKeywordPiece *)SvPVX(argsv);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/t/30pieces-literal.t 
new/XS-Parse-Keyword-0.22/t/30pieces-literal.t
--- old/XS-Parse-Keyword-0.21/t/30pieces-literal.t      2021-10-12 
10:55:55.000000000 +0200
+++ new/XS-Parse-Keyword-0.22/t/30pieces-literal.t      2022-02-21 
22:38:00.000000000 +0100
@@ -20,4 +20,12 @@
    is( $ret, "foo", 'result of piecestr' );
 }
 
+{
+   my $ret1 = do { pieceautosemi; };
+   is( $ret1, "EOS", 'result of pieceautosemi with ;' );
+
+   my $ret2 = do { pieceautosemi };
+   is( $ret2, "EOS", 'result of pieceautosemi at end of block' );
+}
+
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XS-Parse-Keyword-0.21/t/pieces.xs 
new/XS-Parse-Keyword-0.22/t/pieces.xs
--- old/XS-Parse-Keyword-0.21/t/pieces.xs       2021-10-12 10:55:55.000000000 
+0200
+++ new/XS-Parse-Keyword-0.22/t/pieces.xs       2022-02-21 22:38:00.000000000 
+0100
@@ -1,7 +1,7 @@
 /*  You may distribute under the terms of either the GNU General Public License
  *  or the Artistic License (the same terms as Perl itself)
  *
- *  (C) Paul Evans, 2021 -- leon...@leonerd.org.uk
+ *  (C) Paul Evans, 2021-2022 -- leon...@leonerd.org.uk
  */
 
 #include "EXTERN.h"
@@ -95,7 +95,7 @@
 {
   /* ignore arg0 */
 
-  *out = newSVOP(OP_CONST, 0, (SV *)hookdata);
+  *out = newSVOP(OP_CONST, 0, SvREFCNT_inc((SV *)hookdata));
 
   return KEYWORD_PLUGIN_EXPR;
 }
@@ -277,6 +277,13 @@
   .build1 = &build_literal,
 };
 
+static const struct XSParseKeywordHooks hooks_autosemi = {
+  .permit_hintkey = hintkey,
+
+  .piece1 = XPK_AUTOSEMI,
+  .build1 = &build_literal,
+};
+
 MODULE = t::pieces  PACKAGE = t::pieces
 
 BOOT:
@@ -311,3 +318,5 @@
   register_xs_parse_keyword("piececolon", &hooks_colon, newSVpvs("colon"));
 
   register_xs_parse_keyword("piecestr", &hooks_str, newSVpvs("foo"));
+
+  register_xs_parse_keyword("pieceautosemi", &hooks_autosemi, newSVpvs("EOS"));

Reply via email to