Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Struct-Dumb for 
openSUSE:Factory checked in at 2025-10-22 12:14:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Struct-Dumb (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Struct-Dumb.new.18484 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Struct-Dumb"

Wed Oct 22 12:14:08 2025 rev:9 rq:1312559 version:0.160.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Struct-Dumb/perl-Struct-Dumb.changes        
2023-02-16 16:56:23.898831668 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Struct-Dumb.new.18484/perl-Struct-Dumb.changes 
    2025-10-22 12:17:42.319062271 +0200
@@ -1,0 +2,24 @@
+Tue Oct 14 12:26:46 UTC 2025 - Tina Müller <[email protected]>
+
+- updated to 0.160.0 (0.16)
+   see /usr/share/doc/packages/perl-Struct-Dumb/Changes
+
+  0.16    2025-09-27
+          [BUGFIXES]
+           * Don't segfault at thread cloning time (RT170460)
+             (workaround for https://github.com/Perl/perl5/issues/23771)
+
+  0.15    2025-08-19
+          [CHANGES]
+           * Added `dumper_info` helper function
+             (thanks Ricardo Signes <[email protected]>)
+           * Make sure to only set `:lvalue` on generated accesor methods for
+             lvalue fields
+           * General style updates for Perl v5.14+
+
+          [BUGFIXES]
+           * Allow field names that are not valid Perl identifiers even when
+             using Perl 5.38+ (RT150958)
+           * More helpful error message if `eval()` fails (RT146412)
+
+-------------------------------------------------------------------

Old:
----
  Struct-Dumb-0.14.tar.gz

New:
----
  README.md
  Struct-Dumb-0.16.tar.gz
  _scmsync.obsinfo
  build.specials.obscpio

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

Other differences:
------------------
++++++ perl-Struct-Dumb.spec ++++++
--- /var/tmp/diff_new_pack.ZTxeyd/_old  2025-10-22 12:17:44.463152587 +0200
+++ /var/tmp/diff_new_pack.ZTxeyd/_new  2025-10-22 12:17:44.475153092 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Struct-Dumb
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,18 +18,23 @@
 
 %define cpan_name Struct-Dumb
 Name:           perl-Struct-Dumb
-Version:        0.14
+Version:        0.160.0
 Release:        0
+# 0.16 -> normalize -> 0.160.0
+%define cpan_version 0.16
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Make simple lightweight record-like structures
 URL:            https://metacpan.org/release/%{cpan_name}
-Source0:        
https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{cpan_version}.tar.gz
 Source1:        cpanspec.yml
+Source100:      README.md
 BuildArch:      noarch
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(Module::Build) >= 0.400400
+BuildRequires:  perl(Module::Build) >= 0.400.400
 BuildRequires:  perl(Test2::V0)
+Provides:       perl(Struct::Dumb) = %{version}
+%undefine       __perllib_provides
 %{perl_requires}
 
 %description
@@ -75,17 +80,17 @@
 supported.
 
 %prep
-%autosetup  -n %{cpan_name}-%{version}
+%autosetup -n %{cpan_name}-%{cpan_version} -p1
 
 %build
-perl Build.PL installdirs=vendor
-./Build build flags=%{?_smp_mflags}
+perl Build.PL --installdirs=vendor
+./Build build --flags=%{?_smp_mflags}
 
 %check
 ./Build test
 
 %install
-./Build install destdir=%{buildroot} create_packlist=0
+./Build install --destdir=%{buildroot} --create_packlist=0
 %perl_gen_filelist
 
 %files -f %{name}.files

++++++ README.md ++++++

## Build Results

Current state of perl in openSUSE:Factory is

![Factory build 
results](https://br.opensuse.org/status/openSUSE:Factory/perl-Struct-Dumb/standard)

The current state of perl in the devel project build (devel:languages:perl)

![Devel project build 
results](https://br.opensuse.org/status/devel:languages:perl/perl-Struct-Dumb)



++++++ Struct-Dumb-0.14.tar.gz -> Struct-Dumb-0.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/.editorconfig 
new/Struct-Dumb-0.16/.editorconfig
--- old/Struct-Dumb-0.14/.editorconfig  1970-01-01 01:00:00.000000000 +0100
+++ new/Struct-Dumb-0.16/.editorconfig  2025-09-27 14:44:50.000000000 +0200
@@ -0,0 +1,4 @@
+root = true
+
+[*.{pm,pl,t}]
+indent_size = 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/Build.PL 
new/Struct-Dumb-0.16/Build.PL
--- old/Struct-Dumb-0.14/Build.PL       2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/Build.PL       2025-09-27 14:44:50.000000000 +0200
@@ -1,3 +1,4 @@
+use v5;
 use strict;
 use warnings;
 
@@ -5,6 +6,9 @@
 
 my $build = Module::Build->new(
    module_name => 'Struct::Dumb',
+   requires => {
+      'perl' => '5.014',
+   },
    test_requires => {
       'Test2::V0' => 0,
    },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/Changes new/Struct-Dumb-0.16/Changes
--- old/Struct-Dumb-0.14/Changes        2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/Changes        2025-09-27 14:44:50.000000000 +0200
@@ -1,5 +1,23 @@
 Revision history for Struct-Dumb
 
+0.16    2025-09-27
+        [BUGFIXES]
+         * Don't segfault at thread cloning time (RT170460)
+           (workaround for https://github.com/Perl/perl5/issues/23771)
+
+0.15    2025-08-19
+        [CHANGES]
+         * Added `dumper_info` helper function
+           (thanks Ricardo Signes <[email protected]>) 
+         * Make sure to only set `:lvalue` on generated accesor methods for
+           lvalue fields
+         * General style updates for Perl v5.14+
+
+        [BUGFIXES]
+         * Allow field names that are not valid Perl identifiers even when
+           using Perl 5.38+ (RT150958)
+         * More helpful error message if `eval()` fails (RT146412)
+
 0.14    2023-02-11
         [CHANGES]
          * Updates to `feature 'class'` support, using `:param` instead of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/LICENSE new/Struct-Dumb-0.16/LICENSE
--- old/Struct-Dumb-0.14/LICENSE        2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/LICENSE        2025-09-27 14:44:50.000000000 +0200
@@ -1,4 +1,4 @@
-This software is copyright (c) 2023 by Paul Evans <[email protected]>.
+This software is copyright (c) 2025 by Paul Evans <[email protected]>.
 
 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) 2023 by Paul Evans <[email protected]>.
+This software is Copyright (c) 2025 by Paul Evans <[email protected]>.
 
 This is free software, licensed under:
 
@@ -270,110 +270,143 @@
 That's all there is to it!
 
 
---- The Artistic License 1.0 ---
+--- The Perl Artistic License 1.0 ---
 
-This software is Copyright (c) 2023 by Paul Evans <[email protected]>.
+This software is Copyright (c) 2025 by Paul Evans <[email protected]>.
 
 This is free software, licensed under:
 
-  The Artistic License 1.0
+  The Perl Artistic License 1.0
 
-The Artistic License
 
-Preamble
 
-The intent of this document is to state the conditions under which a Package
-may be copied, such that the Copyright Holder maintains some semblance of
-artistic control over the development of the package, while giving the users of
-the package the right to use and distribute the Package in a more-or-less
-customary fashion, plus the right to make reasonable modifications.
+
+
+                         The "Artistic License"
+
+                                Preamble
+
+The intent of this document is to state the conditions under which a
+Package may be copied, such that the Copyright Holder maintains some
+semblance of artistic control over the development of the package,
+while giving the users of the package the right to use and distribute
+the Package in a more-or-less customary fashion, plus the right to make
+reasonable modifications.
 
 Definitions:
 
-  - "Package" refers to the collection of files distributed by the Copyright
-    Holder, and derivatives of that collection of files created through
-    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.
-  - "Copyright Holder" is whoever is named in the copyright or copyrights for
-    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.)
-  - "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.
+        "Package" refers to the collection of files distributed by the
+        Copyright Holder, and derivatives of that collection of files
+        created through 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 as specified below.
+
+        "Copyright Holder" is whoever is named in the copyright or
+        copyrights for 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.)
+
+        "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.
 
 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
 duplicate all of the original copyright notices and associated disclaimers.
 
-2. You may apply bug fixes, portability fixes and other modifications derived
-from the Public Domain or from the Copyright Holder. A Package modified in such
-a way shall still be considered the Standard Version.
-
-3. You may otherwise modify your copy of this Package in any way, provided that
-you insert a prominent notice in each changed file stating how and when you
-changed that file, and provided that you do at least ONE of the following:
-
-  a) place your modifications in the Public Domain or otherwise make them
-     Freely Available, such as by posting said modifications to Usenet or an
-     equivalent medium, or placing the modifications on a major archive site
-     such as ftp.uu.net, or by allowing the Copyright Holder to include your
-     modifications in the Standard Version of the Package.
-
-  b) use the modified Package only within your corporation or organization.
-
-  c) rename any non-standard executables so the names do not conflict with
-     standard executables, which must also be provided, and provide a separate
-     manual page for each non-standard executable that clearly documents how it
-     differs from the Standard Version.
-
-  d) make other distribution arrangements with the Copyright Holder.
-
-4. You may distribute the programs of this Package in object code or executable
-form, provided that you do at least ONE of the following:
-
-  a) distribute a Standard Version of the executables and library files,
-     together with instructions (in the manual page or equivalent) on where to
-     get the Standard Version.
-
-  b) accompany the distribution with the machine-readable source of the Package
-     with your modifications.
-
-  c) accompany any non-standard executables with their corresponding Standard
-     Version executables, giving the non-standard executables non-standard
-     names, and clearly documenting the differences in manual pages (or
-     equivalent), together with instructions on where to get the Standard
-     Version.
+2. You may apply bug fixes, portability fixes and other modifications
+derived from the Public Domain or from the Copyright Holder.  A Package
+modified in such a way shall still be considered the Standard Version.
 
-  d) make other distribution arrangements with the Copyright Holder.
+3. You may otherwise modify your copy of this Package in any way, provided
+that you insert a prominent notice in each changed file stating how and
+when you changed that file, and provided that you do at least ONE of the
+following:
 
-5. You may charge a reasonable copying fee for any distribution of this
-Package.  You may charge any fee you choose for support of this Package. You
-may not charge a fee for this Package itself. However, you may distribute this
-Package in aggregate with other (possibly commercial) programs as part of a
-larger (possibly commercial) software distribution provided that you do not
-advertise this Package as a product of your own.
-
-6. The scripts and library files supplied as input to or produced as output
-from the programs of this Package do not automatically fall under the copyright
-of this Package, but belong to whomever generated them, and may be sold
-commercially, and may be aggregated with this Package.
+    a) place your modifications in the Public Domain or otherwise make them
+    Freely Available, such as by posting said modifications to Usenet or
+    an equivalent medium, or placing the modifications on a major archive
+    site such as uunet.uu.net, or by allowing the Copyright Holder to include
+    your modifications in the Standard Version of the Package.
+
+    b) use the modified Package only within your corporation or organization.
+
+    c) rename any non-standard executables so the names do not conflict
+    with standard executables, which must also be provided, and provide
+    a separate manual page for each non-standard executable that clearly
+    documents how it differs from the Standard Version.
 
-7. C or perl subroutines supplied by you and linked into this Package shall not
-be considered part of this Package.
+    d) make other distribution arrangements with the Copyright Holder.
+
+4. You may distribute the programs of this Package in object code or
+executable form, provided that you do at least ONE of the following:
+
+    a) distribute a Standard Version of the executables and library files,
+    together with instructions (in the manual page or equivalent) on where
+    to get the Standard Version.
+
+    b) accompany the distribution with the machine-readable source of
+    the Package with your modifications.
+
+    c) give non-standard executables non-standard names, and clearly
+    document the differences in manual pages (or equivalent), together
+    with instructions on where to get the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+5. You may charge a reasonable copying fee for any distribution of this
+Package.  You may charge any fee you choose for support of this
+Package.  You may not charge a fee for this Package itself.  However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you do not advertise this Package as a
+product of your own.  You may embed this Package's interpreter within
+an executable of yours (by linking); this shall be construed as a mere
+form of aggregation, provided that the complete Standard Version of the
+interpreter is so embedded.
+
+6. The scripts and library files supplied as input to or produced as
+output from the programs of this Package do not automatically fall
+under the copyright of this Package, but belong to whoever generated
+them, and may be sold commercially, and may be aggregated with this
+Package.  If such scripts or library files are aggregated with this
+Package via the so-called "undump" or "unexec" methods of producing a
+binary executable image, then distribution of such an image shall
+neither be construed as a distribution of this Package nor shall it
+fall under the restrictions of Paragraphs 3 and 4, provided that you do
+not represent such an executable image as a Standard Version of this
+Package.
+
+7. C subroutines (or comparably compiled subroutines in other
+languages) supplied by you and linked into this Package in order to
+emulate subroutines and variables of the language defined by this
+Package shall not be considered part of this Package, but are the
+equivalent of input as in Paragraph 6, provided these subroutines do
+not change the language in any way that would cause it to fail the
+regression tests for the language.
+
+8. Aggregation of this Package with a commercial distribution is always
+permitted provided that the use of this Package is embedded; that is,
+when no overt attempt is made to make this Package's interfaces visible
+to the end user of the commercial distribution.  Such use shall not be
+construed as a distribution of this Package.
 
-8. The name of the Copyright Holder may not be used to endorse or promote
+9. The name of the Copyright Holder may not be used to endorse or promote
 products derived from this software without specific prior written permission.
 
-9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
-The End
+                                The End
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/MANIFEST 
new/Struct-Dumb-0.16/MANIFEST
--- old/Struct-Dumb-0.14/MANIFEST       2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/MANIFEST       2025-09-27 14:44:50.000000000 +0200
@@ -1,3 +1,4 @@
+.editorconfig
 Build.PL
 Changes
 lib/Struct/Dumb.pm
@@ -14,4 +15,6 @@
 t/05predicate.t
 t/10data-dump.t
 t/11data-dump-late.t
+t/30threads.t
+t/90rt150958.t
 t/99pod.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/META.json 
new/Struct-Dumb-0.16/META.json
--- old/Struct-Dumb-0.14/META.json      2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/META.json      2025-09-27 14:44:50.000000000 +0200
@@ -4,7 +4,7 @@
       "Paul Evans <[email protected]>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.4231",
+   "generated_by" : "Module::Build version 0.4234",
    "license" : [
       "perl_5"
    ],
@@ -19,6 +19,11 @@
             "Module::Build" : "0.4004"
          }
       },
+      "runtime" : {
+         "requires" : {
+            "perl" : "5.014"
+         }
+      },
       "test" : {
          "requires" : {
             "Test2::V0" : "0"
@@ -28,7 +33,7 @@
    "provides" : {
       "Struct::Dumb" : {
          "file" : "lib/Struct/Dumb.pm",
-         "version" : "0.14"
+         "version" : "0.16"
       }
    },
    "release_status" : "stable",
@@ -37,6 +42,6 @@
          "http://dev.perl.org/licenses/";
       ]
    },
-   "version" : "0.14",
-   "x_serialization_backend" : "JSON::PP version 4.07"
+   "version" : "0.16",
+   "x_serialization_backend" : "JSON::PP version 4.16"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/META.yml 
new/Struct-Dumb-0.16/META.yml
--- old/Struct-Dumb-0.14/META.yml       2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/META.yml       2025-09-27 14:44:50.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   Module::Build: '0.4004'
 dynamic_config: 1
-generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'Module::Build version 0.4234, CPAN::Meta::Converter version 
2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -16,8 +16,10 @@
 provides:
   Struct::Dumb:
     file: lib/Struct/Dumb.pm
-    version: '0.14'
+    version: '0.16'
+requires:
+  perl: '5.014'
 resources:
   license: http://dev.perl.org/licenses/
-version: '0.14'
+version: '0.16'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/README new/Struct-Dumb-0.16/README
--- old/Struct-Dumb-0.14/README 2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/README 2025-09-27 14:44:50.000000000 +0200
@@ -142,6 +142,27 @@
 
     Takes the same options as "struct".
 
+ dumper_info
+
+       my $info = Struct::Dumb::dumper_info( $struct );
+
+    Since version 0.15.
+
+    This function takes any instance of a Struct::Dumb-style struct and
+    returns a hashref with the keys named, fields, and values. "named" is a
+    boolean, which is true if the struct uses a named constructor. "fields"
+    is an arrayref giving the names of the struct's fields. "values" is an
+    arrayref giving the values for those fields in corresponding order.
+
+    This is just meant for tools like pretty printers to be able to inspect
+    structures. We can't stop you from using it for nefarious purposes, but
+    please don't.
+
+    If the given $struct is not an instance of a known class, an exception
+    will be raised.
+
+    This function is not exported.
+
 DATA::DUMP FILTER
 
     Since version 0.10.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/lib/Struct/Dumb.pm 
new/Struct-Dumb-0.16/lib/Struct/Dumb.pm
--- old/Struct-Dumb-0.14/lib/Struct/Dumb.pm     2023-02-11 13:57:36.000000000 
+0100
+++ new/Struct-Dumb-0.16/lib/Struct/Dumb.pm     2025-09-27 14:44:50.000000000 
+0200
@@ -1,18 +1,16 @@
 #  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, 2012-2022 -- [email protected]
+#  (C) Paul Evans, 2012-2024 -- [email protected]
 
-package Struct::Dumb;
+package Struct::Dumb 0.16;
 
-use strict;
+use v5.14;
 use warnings;
 
-our $VERSION = '0.14';
-
 use Carp;
 
-use Scalar::Util qw( refaddr );
+use Scalar::Util qw( blessed refaddr );
 
 # 'overloading.pm' was only added in 5.10
 # Before that we can't easily implement forbidding of @{} overload, so lets not
@@ -20,6 +18,26 @@
 
 use constant HAVE_FEATURE_CLASS => defined eval { require feature; 
$feature::feature{class} };
 
+BEGIN {
+   if( HAVE_FEATURE_CLASS ) {
+      # Before Perl 5.43.4, a class with no fields in it would cause thread
+      # cloning to segfault.
+      #   https://github.com/Perl/perl5/issues/23771
+      my $dummy_field = "";
+      $dummy_field = 'field $dummy;' if $^V lt v5.43.4;
+
+      my $ok = eval <<"EOF";
+         { use experimental 'class'; class Struct::Dumb::Struct 
{$dummy_field}; }
+         1
+EOF
+
+      die $@ unless $ok;
+   }
+   else {
+      eval "{ package Struct::Dumb::Struct; }";
+   }
+}
+
 =head1 NAME
 
 C<Struct::Dumb> - make simple lightweight record-like structures
@@ -281,6 +299,7 @@
    }
 
    no strict 'refs';
+   *{"${pkg}::ISA"} = [ 'Struct::Dumb::Struct' ];
    *{"${pkg}::$_"} = $subs{$_} for keys %subs;
 }
 
@@ -317,20 +336,38 @@
 
    my @fieldcode = map {
       my $name = $_;
-      my $var = "\$$name";
+      die "Field names are not permitted to contain ( or ) chars" if $name =~ 
m/[()]/;
 
-      "  field $var :param = undef;",
-      "  method $name$lvalue { \@_ and croak \"$pkg->$name invoked with 
arguments\"; $var }",
+      # Mangle the field name until it has only valid identifiers
+      # TODO: If someone tries to name a field  foo_xDDbar  then it might
+      # conflict with a mangled one.
+      my $var = '$' . $name =~ s/^(\P{ID_Start})/sprintf "_x%X", ord $1/er
+                            =~ s/(\P{ID_Continue})/sprintf "_x%X", ord $1/ger;
+
+      if( $var eq '$'.$name ) {
+         "  field $var :param = undef;",
+         "  method $name$lvalue { \@_ and croak \"$pkg->$name invoked with 
arguments\"; $var }",
+      }
+      else {
+         my $qname = quotemeta $name;
+         my $qqname = $name =~ s/"/\\"/gr;
+         "  field $var :param($name) = undef;",
+         "  { no strict 'refs'; *{\"${pkg}::${qname}\"} = method$lvalue { \@_ 
and croak \"$pkg->$qqname invoked with argument\"; $var } }",
+      }
    } @$fields;
 
    my $code = join( "\n",
       "use experimental 'class';",
-      "class $pkg {",
+      "class $pkg :isa(Struct::Dumb::Struct) {",
       "  use Carp;",
       @fieldcode,
       "}", "" );
 
-   eval "$code; 1" or die $@;
+   unless( eval "$code; 1" ) {
+      my $e = $@;
+      $e =~ s/at \(eval \d+\) line \d+/"at eval() in ".__FILE__." line 
".__LINE__/eg;
+      die $e;
+   }
 }
 
 =head2 struct
@@ -376,6 +413,56 @@
 
 =cut
 
+=head2 dumper_info
+
+   my $info = Struct::Dumb::dumper_info( $struct );
+
+I<Since version 0.15.>
+
+This function takes any instance of a Struct::Dumb-style struct and returns a
+hashref with the keys C<named>, C<fields>, and C<values>. "named" is a
+boolean, which is true if the struct uses a named constructor. "fields" is an
+arrayref giving the names of the struct's fields. "values" is an arrayref
+giving the values for those fields in corresponding order.
+
+This is just meant for tools like pretty printers to be able to inspect
+structures. We can't stop you from using it for nefarious purposes, but please
+don't.
+
+If the given C<$struct> is not an instance of a known class, an exception will
+be raised.
+
+This function is not exported.
+
+=cut
+
+sub dumper_info
+{
+   my ( $struct ) = @_;
+
+   my $class = blessed $struct;
+
+   unless( defined $class and $struct->isa( 'Struct::Dumb::Struct' ) ) {
+      croak "Struct::Dumb::dumper_info invoked with non-struct argument: 
$struct";
+   }
+
+   # Perl drops the leading `main::` in `main::StructName` so if there's no
+   # `::` we'll have to put it back
+   $class =~ m/::/ or $class = "main::$class";
+   my $meta = $_STRUCT_PACKAGES{$class};
+
+   unless( $meta ) {
+       confess "Struct::Dumb::dumper_info encountered unknown struct class 
$class (this should not happen!)";
+   }
+
+   my $fields = $meta->{fields};
+   return {
+      named  => !!$meta->{named},
+      fields => [ @$fields ],
+      values => [ map {; scalar $struct->$_ } @$fields ],
+   };
+}
+
 =head1 DATA::DUMP FILTER
 
 I<Since version 0.10.>
@@ -441,17 +528,16 @@
 
    Data::Dump::Filtered::add_dump_filter( sub {
       my ( $ctx, $obj ) = @_;
-      return undef unless my $meta = $_STRUCT_PACKAGES{ $ctx->class };
+      return undef unless $_STRUCT_PACKAGES{ $ctx->class };
+
+      my $dump = dumper_info( $obj );
 
-      my $fields = $meta->{fields};
       return {
          dump => sprintf "%s(%s)", $ctx->class,
             join ", ", map {
-               my $field = $fields->[$_];
-
-               ( $meta->{named} ? "$field => " : "" ) .
-               Data::Dump::dump($obj->$field)
-            } 0 .. $#$fields
+               ( $dump->{named} ? "$dump->{fields}[$_] => " : "" ) .
+               Data::Dump::dump($dump->{values}[$_]),
+            } 0 .. $#{$dump->{fields}},
       };
    });
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/00use.t 
new/Struct-Dumb-0.16/t/00use.t
--- old/Struct-Dumb-0.14/t/00use.t      2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/t/00use.t      2025-09-27 14:44:50.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/01point.t 
new/Struct-Dumb-0.16/t/01point.t
--- old/Struct-Dumb-0.14/t/01point.t    2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/t/01point.t    2025-09-27 14:44:50.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;
@@ -14,6 +14,8 @@
 my $point = Point(10, 20);
 ok( ref $point, '$point is a ref' );
 
+isa_ok( $point, 'Struct::Dumb::Struct' );
+
 can_ok( $point, "x" );
 
 is( $point->x, 10, '$point->x is 10' );
@@ -62,4 +64,12 @@
 like( "$point", qr/^main::Point=Struct::Dumb\(0x[0-9a-fA-F]+\)$/,
     'Point stringifies to something sensible' );
 
+is( Struct::Dumb::dumper_info( $point ),
+   {
+      named  => F(),
+      fields => [qw( x y )],
+      values => [ 10, 30 ],
+   },
+   'Struct::Dumb::dumper_info returns metadata and field values' );
+
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/02scope.t 
new/Struct-Dumb-0.16/t/02scope.t
--- old/Struct-Dumb-0.14/t/02scope.t    2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/t/02scope.t    2025-09-27 14:44:50.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/03readonly.t 
new/Struct-Dumb-0.16/t/03readonly.t
--- old/Struct-Dumb-0.14/t/03readonly.t 2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/t/03readonly.t 2025-09-27 14:44:50.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/04named.t 
new/Struct-Dumb-0.16/t/04named.t
--- old/Struct-Dumb-0.14/t/04named.t    2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/t/04named.t    2025-09-27 14:44:50.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/05predicate.t 
new/Struct-Dumb-0.16/t/05predicate.t
--- old/Struct-Dumb-0.14/t/05predicate.t        2023-02-11 13:57:36.000000000 
+0100
+++ new/Struct-Dumb-0.16/t/05predicate.t        2025-09-27 14:44:50.000000000 
+0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/10data-dump.t 
new/Struct-Dumb-0.16/t/10data-dump.t
--- old/Struct-Dumb-0.14/t/10data-dump.t        2023-02-11 13:57:36.000000000 
+0100
+++ new/Struct-Dumb-0.16/t/10data-dump.t        2025-09-27 14:44:50.000000000 
+0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/11data-dump-late.t 
new/Struct-Dumb-0.16/t/11data-dump-late.t
--- old/Struct-Dumb-0.14/t/11data-dump-late.t   2023-02-11 13:57:36.000000000 
+0100
+++ new/Struct-Dumb-0.16/t/11data-dump-late.t   2025-09-27 14:44:50.000000000 
+0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/30threads.t 
new/Struct-Dumb-0.16/t/30threads.t
--- old/Struct-Dumb-0.14/t/30threads.t  1970-01-01 01:00:00.000000000 +0100
+++ new/Struct-Dumb-0.16/t/30threads.t  2025-09-27 14:44:50.000000000 +0200
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+
+use v5.14;
+use warnings;
+
+use Test2::V0;
+use Test2::IPC; # perform thread init
+
+eval { require Config && $Config::Config{useithreads} } or
+   plan skip_all => "This perl does not support threads";
+
+# Tests whether the presence of Struct::Dumb instances will upset thread
+# cloning. Related to
+#   https://rt.cpan.org/Ticket/Display.html?id=170460
+#   https://github.com/Perl/perl5/issues/23771
+
+use Struct::Dumb;
+require threads;
+
+struct Point => [qw( x y )];
+
+my $point = Point(10, 20);
+
+my $values = threads->create(sub {
+   return [ $point->x, $point->y ];
+})->join;
+is( $values, [ 10, 20 ], 'Point struct survives thread cloning' );
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/90rt150958.t 
new/Struct-Dumb-0.16/t/90rt150958.t
--- old/Struct-Dumb-0.14/t/90rt150958.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Struct-Dumb-0.16/t/90rt150958.t 2025-09-27 14:44:50.000000000 +0200
@@ -0,0 +1,54 @@
+#!/usr/bin/perl
+
+use v5.14;
+use warnings;
+
+use Test2::V0;
+
+use Scalar::Util qw( refaddr );
+
+use Struct::Dumb;
+
+# Check that we can use field names that aren't valid as Perl identifiers
+
+# positional
+{
+   struct WithDot => [qw( bla.foo )];
+
+   my $val = WithDot( "the value" );
+
+   my $meth = "bla.foo";
+   is( $val->$meth, "the value", 'Accessor of instance created with positional 
constructor' );
+}
+
+# leading digits in field names
+{
+   struct WithDigit => [qw( 1 2 3 )];
+
+   my $val = WithDigit( 4, 5, 6 );
+
+   my $meth = "1";
+   is( $val->$meth, 4, 'Accessor of instance with single-digit field names' );
+}
+
+# quote symbols in field names
+{
+   struct WithQuotes => [qw( abc "abc" )];
+
+   my $val = WithQuotes( "first", "second" );
+
+   my $meth = q("abc");
+   is( $val->$meth, "second", 'Accessor of instance with quotes on field 
names' );
+}
+
+# named
+{
+   struct WithDotNamed => [qw( bla.foo )], named_constructor => 1;
+
+   my $val = WithDotNamed( 'bla.foo' => "the value" );
+
+   my $meth = "bla.foo";
+   is( $val->$meth, "the value", 'Accessor of instance created with named 
constructor' );
+}
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Struct-Dumb-0.14/t/99pod.t 
new/Struct-Dumb-0.16/t/99pod.t
--- old/Struct-Dumb-0.14/t/99pod.t      2023-02-11 13:57:36.000000000 +0100
+++ new/Struct-Dumb-0.16/t/99pod.t      2025-09-27 14:44:50.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use strict;
+use v5.14;
 use warnings;
 
 use Test2::V0;

++++++ _scmsync.obsinfo ++++++
mtime: 1760444807
commit: f9708f149bba2029c278e7cce3642b41c6fcdfff159be7943a344b33fe162cd8
url: https://src.opensuse.org/perl/perl-Struct-Dumb.git
revision: f9708f149bba2029c278e7cce3642b41c6fcdfff159be7943a344b33fe162cd8
projectscmsync: https://src.opensuse.org/perl/_ObsPrj

++++++ 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-10-14 16:20:04.000000000 +0200
@@ -0,0 +1 @@
+.osc

Reply via email to