Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-XS-Parse-Sublike for
openSUSE:Factory checked in at 2025-11-28 16:54:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XS-Parse-Sublike (Old)
and /work/SRC/openSUSE:Factory/.perl-XS-Parse-Sublike.new.14147 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-XS-Parse-Sublike"
Fri Nov 28 16:54:02 2025 rev:4 rq:1320470 version:0.400.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-XS-Parse-Sublike/perl-XS-Parse-Sublike.changes
2025-10-10 17:13:16.387150709 +0200
+++
/work/SRC/openSUSE:Factory/.perl-XS-Parse-Sublike.new.14147/perl-XS-Parse-Sublike.changes
2025-11-28 16:56:23.507025581 +0100
@@ -1,0 +2,10 @@
+Sat Nov 15 05:32:49 UTC 2025 - Tina Müller <[email protected]>
+
+- updated to 0.400.0 (0.40)
+ see /usr/share/doc/packages/perl-XS-Parse-Sublike/Changes
+
+ 0.40 2025-11-14
+ [CHANGES]
+ * Experimentally support refalias syntax in extended signatures
+
+-------------------------------------------------------------------
Old:
----
XS-Parse-Sublike-0.39.tar.gz
New:
----
XS-Parse-Sublike-0.40.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-XS-Parse-Sublike.spec ++++++
--- /var/tmp/diff_new_pack.15po24/_old 2025-11-28 16:56:24.319059771 +0100
+++ /var/tmp/diff_new_pack.15po24/_new 2025-11-28 16:56:24.327060108 +0100
@@ -18,10 +18,10 @@
%define cpan_name XS-Parse-Sublike
Name: perl-XS-Parse-Sublike
-Version: 0.390.0
+Version: 0.400.0
Release: 0
-# 0.39 -> normalize -> 0.390.0
-%define cpan_version 0.39
+# 0.40 -> normalize -> 0.400.0
+%define cpan_version 0.40
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: XS functions to assist in parsing sub-like syntax
URL: https://metacpan.org/release/%{cpan_name}
@@ -33,7 +33,7 @@
BuildRequires: perl(File::ShareDir) >= 1.0
BuildRequires: perl(Module::Build) >= 0.400.400
BuildRequires: perl(Sub::Util)
-BuildRequires: perl(Test2::V0)
+BuildRequires: perl(Test2::V0) >= 0.000147
Requires: perl(File::ShareDir) >= 1.0
Provides: perl(Sublike::Extended) = %{version}
Provides: perl(XS::Parse::Sublike) = %{version}
++++++ XS-Parse-Sublike-0.39.tar.gz -> XS-Parse-Sublike-0.40.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/Build.PL
new/XS-Parse-Sublike-0.40/Build.PL
--- old/XS-Parse-Sublike-0.39/Build.PL 2025-09-12 20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/Build.PL 2025-11-14 18:44:07.000000000 +0100
@@ -26,7 +26,7 @@
},
test_requires => {
'Sub::Util' => 0,
- 'Test2::V0' => 0,
+ 'Test2::V0' => '0.000147',
},
configure_requires => {
'Module::Build' => '0.4004', # test_requires
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/Changes
new/XS-Parse-Sublike-0.40/Changes
--- old/XS-Parse-Sublike-0.39/Changes 2025-09-12 20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/Changes 2025-11-14 18:44:07.000000000 +0100
@@ -1,5 +1,9 @@
Revision history for XS-Parse-Sublike
+0.40 2025-11-14
+ [CHANGES]
+ * Experimentally support refalias syntax in extended signatures
+
0.39 2025-09-12
[BUGFIXES]
* Make sure to set `B::Deparse`'s ->ambient_pragmas when running
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/MANIFEST
new/XS-Parse-Sublike-0.40/MANIFEST
--- old/XS-Parse-Sublike-0.39/MANIFEST 2025-09-12 20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/MANIFEST 2025-11-14 18:44:07.000000000 +0100
@@ -36,6 +36,7 @@
t/05func-sig-attributes.t
t/06func-conditional-default.t
t/07func-lexical.t
+t/08func-refs.t
t/10stages-permit.t
t/11stages-pre_subparse.t
t/12stages-post_blockstart.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/META.json
new/XS-Parse-Sublike-0.40/META.json
--- old/XS-Parse-Sublike-0.39/META.json 2025-09-12 20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/META.json 2025-11-14 18:44:07.000000000 +0100
@@ -33,22 +33,22 @@
"test" : {
"requires" : {
"Sub::Util" : "0",
- "Test2::V0" : "0"
+ "Test2::V0" : "0.000147"
}
}
},
"provides" : {
"Sublike::Extended" : {
"file" : "lib/Sublike/Extended.pm",
- "version" : "0.39"
+ "version" : "0.40"
},
"XS::Parse::Sublike" : {
"file" : "lib/XS/Parse/Sublike.pm",
- "version" : "0.39"
+ "version" : "0.40"
},
"XS::Parse::Sublike::Builder" : {
"file" : "lib/XS/Parse/Sublike/Builder.pm",
- "version" : "0.39"
+ "version" : "0.40"
}
},
"release_status" : "stable",
@@ -57,6 +57,6 @@
"http://dev.perl.org/licenses/"
]
},
- "version" : "0.39",
+ "version" : "0.40",
"x_serialization_backend" : "JSON::PP version 4.16"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/META.yml
new/XS-Parse-Sublike-0.40/META.yml
--- old/XS-Parse-Sublike-0.39/META.yml 2025-09-12 20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/META.yml 2025-11-14 18:44:07.000000000 +0100
@@ -5,7 +5,7 @@
build_requires:
ExtUtils::CBuilder: '0'
Sub::Util: '0'
- Test2::V0: '0'
+ Test2::V0: '0.000147'
configure_requires:
Module::Build: '0.4004'
dynamic_config: 1
@@ -18,17 +18,17 @@
provides:
Sublike::Extended:
file: lib/Sublike/Extended.pm
- version: '0.39'
+ version: '0.40'
XS::Parse::Sublike:
file: lib/XS/Parse/Sublike.pm
- version: '0.39'
+ version: '0.40'
XS::Parse::Sublike::Builder:
file: lib/XS/Parse/Sublike/Builder.pm
- version: '0.39'
+ version: '0.40'
requires:
File::ShareDir: '1.00'
perl: '5.016'
resources:
license: http://dev.perl.org/licenses/
-version: '0.39'
+version: '0.40'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/README
new/XS-Parse-Sublike-0.40/README
--- old/XS-Parse-Sublike-0.39/README 2025-09-12 20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/README 2025-11-14 18:44:07.000000000 +0100
@@ -268,6 +268,12 @@
a signature and additionally permit the use of attribute declarations
on parameter variables, as documented in Sublike::Extended.
+ XS_PARSE_SUBLIKE_FLAG_SIGNATURE_REFALIAS
+
+ If set, use the extended signature parser of this module when parsing
+ a signature and additionally permit the use of refalias parameter
+ syntax, as documented in Sublike::Extended.
+
In addition there are two U8 fields named require_parts and skip_parts
which control the behaviour of various parts of the syntax which are
usually optional. Any parts with bits set in require_parts become
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/XS-Parse-Sublike-0.39/include/parse_subsignature_ex.h
new/XS-Parse-Sublike-0.40/include/parse_subsignature_ex.h
--- old/XS-Parse-Sublike-0.39/include/parse_subsignature_ex.h 2025-09-12
20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/include/parse_subsignature_ex.h 2025-11-14
18:44:07.000000000 +0100
@@ -16,6 +16,10 @@
/* Permits ( $param :Attribute(Value) ) attributes on params
* These must be registered by calling register_subsignature_attribute()
*/
+
+ PARSE_SUBSIGNATURE_REFALIAS = (1<<2),
+ /* Permits ( \$scalar, \@array, \%hash ) refalias parameters
+ */
};
#define boot_parse_subsignature_ex() XPS_boot_parse_subsignature_ex(aTHX)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/lib/Sublike/Extended.pm
new/XS-Parse-Sublike-0.40/lib/Sublike/Extended.pm
--- old/XS-Parse-Sublike-0.39/lib/Sublike/Extended.pm 2025-09-12
20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/lib/Sublike/Extended.pm 2025-11-14
18:44:07.000000000 +0100
@@ -3,7 +3,7 @@
#
# (C) Paul Evans, 2023-2024 -- [email protected]
-package Sublike::Extended 0.39;
+package Sublike::Extended 0.40;
use v5.14;
use warnings;
@@ -68,7 +68,7 @@
version 5.26 or later, this module is unlikely to be useful in earlier
versions of Perl.
-=head2 Named parameters
+=head2 Named Parameters
Extended subroutines can declare named parameters in the signature, after any
positional ones. These take the form of a name prefixed by a colon character.
@@ -118,6 +118,10 @@
not consumed as a named parameter pair, in the original order passed by the
caller, including any duplicates.
+This syntax is compatible with that proposed by
+L<PPC0024|https://github.com/Perl/PPCs/blob/main/ppcs/ppc0024-signature-named-parameters.md>,
+which will become available in Perl version 5.43.5.
+
=head2 Parameter Attributes
Parameters to extended subroutines can use attribute syntax to apply extra
@@ -130,6 +134,35 @@
behaviour of such an attribute would be defined by whatever module provided
the attribute.
+=head2 Refalias Parameters
+
+I<Since version 0.40.>
+
+Parameters to extended subroutines can use refalias syntax in order to create
+lexical variables that alias, rather than contain copies of, variables that
+callers pass in references.
+
+ sub h (\@items) { ... }
+
+ # The caller must provide an ARRAY reference
+ my @arr = (1, 2, 3, 4, 5);
+ h(\@arr);
+
+This syntax is similar to refalias assignment as provided by
+L<feature/The 'refaliasing' feature>. This example creates a lexical array
+variable within the body of the function, which aliases an array passed
+I<by reference> from the caller.
+
+Refaliased variables may be scalars, arrays, or hashes. For argument handling
+purposes each will act like a mandatory positional scalar which consumes a
+reference to a variable of the matching type. If the caller does not pass a
+reference, or a reference to a mismatched type of variable, an exception is
+thrown as part of argument handling in the signature.
+
+The body of the function can see the value stored by the referred variable
+and make modifications to it. Any such modifications will be reflected in the
+variable whose reference was passed by the caller.
+
=head1 KEYWORDS
=head2 extended
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/XS-Parse-Sublike-0.39/lib/XS/Parse/Sublike/Builder.pm
new/XS-Parse-Sublike-0.40/lib/XS/Parse/Sublike/Builder.pm
--- old/XS-Parse-Sublike-0.39/lib/XS/Parse/Sublike/Builder.pm 2025-09-12
20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/lib/XS/Parse/Sublike/Builder.pm 2025-11-14
18:44:07.000000000 +0100
@@ -3,7 +3,7 @@
#
# (C) Paul Evans, 2020-2024 -- [email protected]
-package XS::Parse::Sublike::Builder 0.39;
+package XS::Parse::Sublike::Builder 0.40;
use v5.14;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/lib/XS/Parse/Sublike.pm
new/XS-Parse-Sublike-0.40/lib/XS/Parse/Sublike.pm
--- old/XS-Parse-Sublike-0.39/lib/XS/Parse/Sublike.pm 2025-09-12
20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/lib/XS/Parse/Sublike.pm 2025-11-14
18:44:07.000000000 +0100
@@ -3,7 +3,7 @@
#
# (C) Paul Evans, 2020-2024 -- [email protected]
-package XS::Parse::Sublike 0.39;
+package XS::Parse::Sublike 0.40;
use v5.14;
use warnings;
@@ -279,6 +279,12 @@
signature and additionally permit the use of attribute declarations on
parameter variables, as documented in L<Sublike::Extended>.
+=item XS_PARSE_SUBLIKE_FLAG_SIGNATURE_REFALIAS
+
+If set, use the extended signature parser of this module when parsing a
+signature and additionally permit the use of refalias parameter syntax, as
+documented in L<Sublike::Extended>.
+
=back
In addition there are two C<U8> fields named I<require_parts> and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/lib/XS/Parse/Sublike.xs
new/XS-Parse-Sublike-0.40/lib/XS/Parse/Sublike.xs
--- old/XS-Parse-Sublike-0.39/lib/XS/Parse/Sublike.xs 2025-09-12
20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/lib/XS/Parse/Sublike.xs 2025-11-14
18:44:07.000000000 +0100
@@ -249,6 +249,8 @@
flags |= PARSE_SUBSIGNATURE_NAMED_PARAMS;
if(hooks->flags & XS_PARSE_SUBLIKE_FLAG_SIGNATURE_PARAM_ATTRIBUTES)
flags |= PARSE_SUBSIGNATURE_PARAM_ATTRIBUTES;
+ if(hooks->flags & XS_PARSE_SUBLIKE_FLAG_SIGNATURE_REFALIAS)
+ flags |= PARSE_SUBSIGNATURE_REFALIAS;
if(hooks->ver >= 7 && (hooks->start_signature ||
hooks->finish_signature))
have_sighooks = true;
}
@@ -660,7 +662,8 @@
.flags = XS_PARSE_SUBLIKE_FLAG_PREFIX|
XS_PARSE_SUBLIKE_FLAG_BODY_OPTIONAL|
XS_PARSE_SUBLIKE_FLAG_SIGNATURE_NAMED_PARAMS|
- XS_PARSE_SUBLIKE_FLAG_SIGNATURE_PARAM_ATTRIBUTES,
+ XS_PARSE_SUBLIKE_FLAG_SIGNATURE_PARAM_ATTRIBUTES|
+ XS_PARSE_SUBLIKE_FLAG_SIGNATURE_REFALIAS,
/* No hooks */
};
@@ -670,7 +673,8 @@
.permit_hintkey = "Sublike::Extended/extended-sub",
.flags = XS_PARSE_SUBLIKE_FLAG_BODY_OPTIONAL|
XS_PARSE_SUBLIKE_FLAG_SIGNATURE_NAMED_PARAMS|
- XS_PARSE_SUBLIKE_FLAG_SIGNATURE_PARAM_ATTRIBUTES,
+ XS_PARSE_SUBLIKE_FLAG_SIGNATURE_PARAM_ATTRIBUTES|
+ XS_PARSE_SUBLIKE_FLAG_SIGNATURE_REFALIAS,
/* No hooks */
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/share/include/XSParseSublike.h
new/XS-Parse-Sublike-0.40/share/include/XSParseSublike.h
--- old/XS-Parse-Sublike-0.39/share/include/XSParseSublike.h 2025-09-12
20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/share/include/XSParseSublike.h 2025-11-14
18:44:07.000000000 +0100
@@ -30,6 +30,8 @@
XS_PARSE_SUBLIKE_FLAG_ALLOW_PKGNAME = 1<<5,
+ XS_PARSE_SUBLIKE_FLAG_SIGNATURE_REFALIAS = 1<<6,
+
/* Back-compat flags we hope to remove in the next ABI version */
XS_PARSE_SUBLIKE_COMPAT_FLAG_DYNAMIC_ACTIONS = 1<<15,
};
@@ -158,6 +160,8 @@
char sigil;
const char *namepv;
STRLEN namelen;
+
+ bool is_refalias;
};
struct XPSSignatureAttributeFuncs {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/src/parse_subsignature_ex.c
new/XS-Parse-Sublike-0.40/src/parse_subsignature_ex.c
--- old/XS-Parse-Sublike-0.39/src/parse_subsignature_ex.c 2025-09-12
20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/src/parse_subsignature_ex.c 2025-11-14
18:44:07.000000000 +0100
@@ -432,6 +432,49 @@
}
#endif
+static XOP xop_refargelem;
+static OP *pp_refargelem(pTHX)
+{
+ U8 priv = PL_op->op_private;
+ IV argix = PTR2IV(cUNOP_AUX->op_aux);
+
+ SV **svp = av_fetch(GvAV(PL_defgv), argix, FALSE);
+ if(!svp || !SvROK(*svp))
+ croak_from_caller("Expected argument %" IVdf " to %" SVf " to be a
reference",
+ argix + 1, SVfARG(S_find_runcv_name(aTHX)));
+
+ SV *rv = SvRV(*svp);
+
+ const char *exp_reftype = NULL;
+ switch(priv & OPpARGELEM_MASK) {
+ case OPpARGELEM_SV:
+ if(SvTYPE(rv) > SVt_PVMG)
+ exp_reftype = "SCALAR";
+ break;
+
+ case OPpARGELEM_AV:
+ if(SvTYPE(rv) != SVt_PVAV)
+ exp_reftype = "ARRAY";
+ break;
+
+ case OPpARGELEM_HV:
+ if(SvTYPE(rv) != SVt_PVHV)
+ exp_reftype = "HASH";
+ break;
+ }
+ if(exp_reftype)
+ croak_from_caller("Expected argument %" IVdf " to %" SVf " to be a
reference to %s",
+ argix + 1, SVfARG(S_find_runcv_name(aTHX)), exp_reftype);
+
+ /* Perform refaliasing into the pad */
+ SV **padentry = &(PAD_SVl(PL_op->op_targ));
+ save_clearsv(padentry);
+ SvREFCNT_dec(*padentry);
+ *padentry = SvREFCNT_inc(rv);
+
+ return PL_op->op_next;
+}
+
/* Parameter attribute extensions */
typedef struct SignatureAttributeRegistration SignatureAttributeRegistration;
@@ -538,6 +581,16 @@
*/
intro_my();
}
+ else if(paramctx->is_refalias) {
+ /* A positional reference alias. */
+
+ /* Acts as a positional for argument consuming purposes */
+ if(paramctx->op)
+ sigctx->positional_elems = op_append_list(OP_LINESEQ,
sigctx->positional_elems,
+ newSTATEOP(0, NULL, paramctx->op));
+
+ sigctx->n_elems++;
+ }
else if(paramctx->sigil == '$') {
/* A positional scalar */
@@ -575,6 +628,7 @@
struct XPSSignatureParamContext paramctx = {
.is_named = false,
+ .is_refalias = false,
.sigil = details->sigil,
.padix = details->padix,
.varop = NULL, /* wil be set below */
@@ -634,6 +688,17 @@
c = lex_peek_unichar(0);
}
+ if((flags & PARSE_SUBSIGNATURE_REFALIAS) && c == '\\') {
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_EXPERIMENTAL__REFALIASING),
+ "refaliases are experimental");
+
+ lex_read_unichar(0);
+ lex_read_space(0);
+
+ paramctx.is_refalias = true;
+ c = lex_peek_unichar(0);
+ }
+
paramctx.sigil = c;
switch(paramctx.sigil) {
case '$': private = OPpARGELEM_SV; break;
@@ -671,7 +736,12 @@
/* named params don't get an individual varop */
}
else {
- paramctx.varop = newUNOP_AUX(OP_ARGELEM, 0, NULL, INT2PTR(UNOP_AUX_item
*, (sigctx->n_elems)));
+ if(paramctx.is_refalias) {
+ paramctx.varop = newUNOP_AUX(OP_CUSTOM, 0, NULL, INT2PTR(UNOP_AUX_item
*, (sigctx->n_elems)));
+ paramctx.varop->op_ppaddr = &pp_refargelem;
+ }
+ else
+ paramctx.varop = newUNOP_AUX(OP_ARGELEM, 0, NULL,
INT2PTR(UNOP_AUX_item *, (sigctx->n_elems)));
paramctx.varop->op_private |= private;
paramctx.varop->op_targ = paramctx.padix;
}
@@ -720,7 +790,7 @@
}
}
- if(paramctx.sigil == '$') {
+ if(paramctx.sigil == '$' || paramctx.is_refalias) {
if(paramctx.is_named) {
}
else {
@@ -732,6 +802,8 @@
if(lex_consume("=") ||
(default_if_undef = lex_consume("//=")) ||
(default_if_false = lex_consume("||="))) {
+ if(paramctx.is_refalias)
+ croak("Cannot supply a defaulting expression to a refalias parameter");
OP *defexpr = parse_termexpr(PARSE_OPTIONAL);
if(PL_parser->error_count)
croak("Expected a defaulting expression for optional parameter");
@@ -845,7 +917,7 @@
if(ctx)
ctx->sigctx = sigctx;
- assert((flags &
~(PARSE_SUBSIGNATURE_NAMED_PARAMS|PARSE_SUBSIGNATURE_PARAM_ATTRIBUTES)) == 0);
+ assert((flags &
~(PARSE_SUBSIGNATURE_NAMED_PARAMS|PARSE_SUBSIGNATURE_PARAM_ATTRIBUTES|PARSE_SUBSIGNATURE_REFALIAS))
== 0);
ENTER;
SAVEDESTRUCTOR_X(&free_parsing_ctx, sigctx);
@@ -1037,6 +1109,11 @@
XopENTRY_set(&xop_argelems_named, xop_dump, &opdump_argelems_named);
#endif
Perl_custom_op_register(aTHX_ &pp_argelems_named, &xop_argelems_named);
+
+ XopENTRY_set(&xop_refargelem, xop_name, "refargelem");
+ XopENTRY_set(&xop_refargelem, xop_desc, "refalias argument element");
+ XopENTRY_set(&xop_refargelem, xop_class, OA_UNOP_AUX);
+ Perl_custom_op_register(aTHX_ &pp_refargelem, &xop_refargelem);
}
#else /* !HAVE_PERL_VERSION(5, 26, 0) */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/t/08func-refs.t
new/XS-Parse-Sublike-0.40/t/08func-refs.t
--- old/XS-Parse-Sublike-0.39/t/08func-refs.t 1970-01-01 01:00:00.000000000
+0100
+++ new/XS-Parse-Sublike-0.40/t/08func-refs.t 2025-11-14 18:44:07.000000000
+0100
@@ -0,0 +1,51 @@
+#!/usr/bin/perl
+
+use v5.14;
+use warnings;
+
+use Test2::V0 0.000147; # is_oneref
+BEGIN {
+ $] >= 5.026000 or plan skip_all => "No parse_subsignature()";
+}
+
+use feature 'signatures';
+no warnings 'experimental';
+
+use lib "t";
+use testcase "t::func";
+
+BEGIN { $^H{"t::func/rfunc"}++ }
+
+{
+ rfunc totals(\@array, \%hash) {
+ return scalar @array + scalar keys %hash;
+ }
+
+ is( totals( [10, 11], {a => "A"} ), 3,
+ 'func with refalias invoked');
+
+ like( dies { totals( {}, {} ) },
+ qr/^Expected argument 1 to main::totals to be a reference to ARRAY at /,
+ 'Exception thrown by wrong reference type' );
+ like( dies { totals( [], [] ) },
+ qr/^Expected argument 2 to main::totals to be a reference to HASH at /,
+ 'Exception thrown by wrong reference type' );
+}
+
+# refaliased variables can be edited in place
+{
+ rfunc inc_all(\@arr) {
+ $_++ for @arr;
+ }
+
+ my @array = ( 1, 2, 3 );
+ inc_all \@array;
+ is( \@array, [ 2, 3, 4 ],
+ 'refalias func can mutate caller-passed container' );
+
+ my $arr = [];
+ inc_all $arr;
+ is_oneref( $arr, '$arr has one reference after refaliasing call' );
+}
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Sublike-0.39/t/func.xs
new/XS-Parse-Sublike-0.40/t/func.xs
--- old/XS-Parse-Sublike-0.39/t/func.xs 2025-09-12 20:50:20.000000000 +0200
+++ new/XS-Parse-Sublike-0.40/t/func.xs 2025-11-14 18:44:07.000000000 +0100
@@ -32,6 +32,12 @@
.flags = XS_PARSE_SUBLIKE_FLAG_SIGNATURE_PARAM_ATTRIBUTES,
};
+static const struct XSParseSublikeHooks parse_rfunc_hooks = {
+ .ver = XSPARSESUBLIKE_ABI_VERSION,
+ .permit_hintkey = "t::func/rfunc",
+ .flags = XS_PARSE_SUBLIKE_FLAG_SIGNATURE_REFALIAS,
+};
+
static const struct XSParseSublikeHooks parse_nafunc_hooks = {
.ver = XSPARSESUBLIKE_ABI_VERSION,
.permit_hintkey = "t::func/nafunc",
@@ -100,6 +106,7 @@
register_xs_parse_sublike("func", &parse_func_hooks, NULL);
register_xs_parse_sublike("nfunc", &parse_nfunc_hooks, NULL);
register_xs_parse_sublike("afunc", &parse_afunc_hooks, NULL);
+ register_xs_parse_sublike("rfunc", &parse_rfunc_hooks, NULL);
register_xs_parse_sublike("nafunc", &parse_nafunc_hooks, NULL);
register_xs_parse_sublike("nopkgfunc", &parse_nopkgfunc_hooks, NULL);
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.15po24/_old 2025-11-28 16:56:24.647073582 +0100
+++ /var/tmp/diff_new_pack.15po24/_new 2025-11-28 16:56:24.659074087 +0100
@@ -1,6 +1,6 @@
-mtime: 1760043245
-commit: c3d8045827b6ec0a513a999cb24c65e6295a9c289db0242f65618b5c5ae5f689
+mtime: 1763184769
+commit: 6f6e4022d76e15158a61264bb86efefdc597b789a791d1d0c527114a26897b00
url: https://src.opensuse.org/perl/perl-XS-Parse-Sublike.git
-revision: c3d8045827b6ec0a513a999cb24c65e6295a9c289db0242f65618b5c5ae5f689
+revision: 6f6e4022d76e15158a61264bb86efefdc597b789a791d1d0c527114a26897b00
projectscmsync: https://src.opensuse.org/perl/_ObsPrj
++++++ build.specials.obscpio ++++++
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2025-11-22 10:29:04.000000000 +0100
@@ -0,0 +1 @@
+.osc