![](https://seccdn.libravatar.org/avatar/128a7b98d536a9cf9b4d4d5a90d63475.jpg?s=120&d=mm&r=g)
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Modern-Perl for openSUSE:Factory checked in at 2023-01-31 16:10:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Modern-Perl (Old) and /work/SRC/openSUSE:Factory/.perl-Modern-Perl.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-Modern-Perl" Tue Jan 31 16:10:16 2023 rev:26 rq:1062253 version:1.20230106 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Modern-Perl/perl-Modern-Perl.changes 2022-05-20 17:52:00.703296228 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Modern-Perl.new.32243/perl-Modern-Perl.changes 2023-01-31 16:16:45.380380167 +0100 @@ -1,0 +2,10 @@ +Fri Jan 6 03:07:46 UTC 2023 - Tina M��ller <timueller+perl@suse.de> + +- updated to 1.20230106 + see /usr/share/doc/packages/perl-Modern-Perl/Changes + + 1.20230106 2023-01-05 17:15:46-08:00 America/Los_Angeles + - update for 2023 year bundle + - fix a few nits in tests + +------------------------------------------------------------------- Old: ---- Modern-Perl-1.20220515.tar.gz New: ---- Modern-Perl-1.20230106.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Modern-Perl.spec ++++++ --- /var/tmp/diff_new_pack.KrH4cT/_old 2023-01-31 16:16:45.828382763 +0100 +++ /var/tmp/diff_new_pack.KrH4cT/_new 2023-01-31 16:16:45.832382786 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-Modern-Perl # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define cpan_name Modern-Perl Name: perl-Modern-Perl -Version: 1.20220515 +Version: 1.20230106 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Enable all of the features of Modern Perl with one import ++++++ Modern-Perl-1.20220515.tar.gz -> Modern-Perl-1.20230106.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20220515/Changes new/Modern-Perl-1.20230106/Changes --- old/Modern-Perl-1.20220515/Changes 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/Changes 2023-01-06 02:15:47.000000000 +0100 @@ -1,5 +1,9 @@ Revision history for Modern::Perl +1.20230106 2023-01-05 17:15:46-08:00 America/Los_Angeles + - update for 2023 year bundle + - fix a few nits in tests + 1.20220515 2022-05-15 11:15:25-07:00 America/Los_Angeles - enable signatures in 2022 year bundle - add 2021 and 2022 year bundles diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20220515/LICENSE new/Modern-Perl-1.20230106/LICENSE --- old/Modern-Perl-1.20220515/LICENSE 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/LICENSE 2023-01-06 02:15:47.000000000 +0100 @@ -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/Modern-Perl-1.20220515/MANIFEST new/Modern-Perl-1.20230106/MANIFEST --- old/Modern-Perl-1.20220515/MANIFEST 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/MANIFEST 2023-01-06 02:15:47.000000000 +0100 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.029. Changes LICENSE MANIFEST diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20220515/META.json new/Modern-Perl-1.20230106/META.json --- old/Modern-Perl-1.20220515/META.json 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/META.json 2023-01-06 02:15:47.000000000 +0100 @@ -4,7 +4,7 @@ "chromatic" ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.029, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -45,9 +45,9 @@ "web" : "https://github.com/chromatic/Modern-Perl" } }, - "version" : "1.20220515", - "x_generated_by_perl" : "v5.34.0", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.26", + "version" : "1.20230106", + "x_generated_by_perl" : "v5.36.0", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.32", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20220515/META.yml new/Modern-Perl-1.20230106/META.yml --- old/Modern-Perl-1.20220515/META.yml 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/META.yml 2023-01-06 02:15:47.000000000 +0100 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.029, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -24,7 +24,7 @@ resources: homepage: https://github.com/chromatic/Modern-Perl repository: https://github.com/chromatic/Modern-Perl.git -version: '1.20220515' -x_generated_by_perl: v5.34.0 +version: '1.20230106' +x_generated_by_perl: v5.36.0 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20220515/Makefile.PL new/Modern-Perl-1.20230106/Makefile.PL --- old/Modern-Perl-1.20220515/Makefile.PL 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/Makefile.PL 2023-01-06 02:15:47.000000000 +0100 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.017. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.029. use strict; use warnings; @@ -27,7 +27,7 @@ "TEST_REQUIRES" => { "Test::More" => "0.98" }, - "VERSION" => "1.20220515", + "VERSION" => "1.20230106", "test" => { "TESTS" => "t/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20220515/lib/Modern/Perl.pm new/Modern-Perl-1.20230106/lib/Modern/Perl.pm --- old/Modern-Perl-1.20220515/lib/Modern/Perl.pm 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/lib/Modern/Perl.pm 2023-01-06 02:15:47.000000000 +0100 @@ -1,6 +1,6 @@ package Modern::Perl; # ABSTRACT: enable all of the features of Modern Perl with one import -$Modern::Perl::VERSION = '1.20220515'; +$Modern::Perl::VERSION = '1.20230106'; use 5.010_000; use strict; @@ -18,11 +18,13 @@ sub VERSION { my ($self, $version) = @_; - return $Modern::Perl::VERSION || 2022 unless defined $version; - return $Modern::Perl::VERSION || 2022 if $version < 2009; + my $default = 2023; + + return $Modern::Perl::VERSION || $default unless defined $version; + return $Modern::Perl::VERSION || $default if $version < 2009; $wanted_date = $version if (caller(1))[3] =~ /::BEGIN/; - return 2022; + return $default; } sub import { @@ -34,6 +36,7 @@ warnings->import; strict->import; + feature->unimport( ':all' ); feature->import( $feature_tag ); if ($feature_tag ge ':5.34') { @@ -66,6 +69,7 @@ 2020 => ':5.30', 2021 => ':5.32', 2022 => ':5.34', + 2023 => ':5.36', ); my $date = shift; @@ -97,7 +101,7 @@ =head1 VERSION -version 1.20220515 +version 1.20230106 =head1 SYNOPSIS @@ -202,6 +206,10 @@ ... enables 5.34 features. + use Modern::Perl '2023'; + +... enables 5.36 features. + Obviously you cannot use newer features on earlier versions. Perl will throw the appropriate exception if you try. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20220515/lib/odern/Perl.pm new/Modern-Perl-1.20230106/lib/odern/Perl.pm --- old/Modern-Perl-1.20220515/lib/odern/Perl.pm 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/lib/odern/Perl.pm 2023-01-06 02:15:47.000000000 +0100 @@ -1,6 +1,6 @@ package odern::Perl; #ABSTRACT: Module for enabling all of the features of Modern Perl -$odern::Perl::VERSION = '1.20220515'; +$odern::Perl::VERSION = '1.20230106'; use Modern::Perl; *import = \&Modern::Perl::import; @@ -19,7 +19,7 @@ =head1 VERSION -version 1.20220515 +version 1.20230106 =head1 AUTHOR diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20220515/t/year_imports.t new/Modern-Perl-1.20230106/t/year_imports.t --- old/Modern-Perl-1.20220515/t/year_imports.t 2022-05-15 20:15:27.000000000 +0200 +++ new/Modern-Perl-1.20230106/t/year_imports.t 2023-01-06 02:15:47.000000000 +0100 @@ -40,6 +40,41 @@ is $@, '', qq|use Modern::Perl $year enables switch|; } +sub test_no_switch_for { + my $year = _get_year(shift); + + eval qq|use Modern::Perl $year; sub { given (0) {} }|; + isnt $@, '', qq|use Modern::Perl $year does not enable switch|; +} + +sub test_no_indirect_for { + my $year = _get_year(shift); + + my $warning = ''; + local $SIG{__WARN__} = sub { $warning = shift }; + + eval qq|use Modern::Perl $year; my \$foo = new Modern::Perl;|; + like $@, qr/syntax error.+near "new Modern::Perl"/, + qq|use Modern::Perl $year disables indirect method calls|; +} + +sub test_no_multidimensional_for { + my $year = _get_year(shift); + + my $warning = ''; + local $SIG{__WARN__} = sub { $warning = shift }; + + eval qq{ + use Modern::Perl $year; + my (\$x, \$y) = (1, 2); + my %foo; + + \$foo{\$x, \$y} = 'bar'; + }; + like $@, qr/Multidimensional hash lookup is disabled/, + qq|use Modern::Perl $year disables multidimensional array emulation|; +} + sub test_say_for { my $year = _get_year(shift); @@ -96,25 +131,53 @@ eval qq{ use Modern::Perl $year; - is uc "\xdf", "SS", q|$year enables unicode_strings|; + is uc "\xdf", "SS", q|use Modern::Perl $year enables unicode_strings|; }; } sub test_signatures_for { my $year = _get_year(shift); - my @narnings; + my @warnings; local $SIG{__WARN__} = sub { push @warnings, @_ }; local $@; + my ($yearnum) = $year =~ m/(\d+)/; eval qq{ use Modern::Perl $year; - sub foo( $bar ) { ... } + sub foo_$yearnum( \$bar ) { ... } }; - is $@, '', q|$year enables signatures|; + is $@, '', qq|use Modern::Perl $year enables signatures|; is @warnings, 0, '... and disables signature warnings'; } +sub test_isa_for { + my $year = _get_year(shift); + + eval qq{ + use Modern::Perl $year; + my \$foo = bless {}, 'Some::Class'; + my \$result = \$foo isa 'Some::Class'; + }; + is $@, '', qq|use Modern::Perl $year enables isa|; +} + +sub test_warnings_for { + my $year = _get_year(shift); + + my $warnings; + + local $SIG{__WARN__} = sub { $warnings = shift }; + + eval qq{ + no warnings; + use Modern::Perl $year; + my \$x = "2:" + 3; + }; + + like $warnings, qr/Argument "2:" isn't numeric/, qq|use Modern::Perl $year enables warnings|; +} + eval 'sub { given (0) {} }'; isnt $@, '', 'use Modern::Perl () does not enable switch'; @@ -142,7 +205,7 @@ test_say_for( '2009' ); test_state_for( '2009' ); - is uc "\xdf", "\xdf", 'but not unicode_strings'; + is uc "\xdf", "\xdf", q|use Modern::Perl '2009' does not enable unicode_strings|; } { @@ -152,7 +215,7 @@ test_say_for( '2010' ); test_state_for( '2010' ); - is uc "\xdf", "\xdf", 'but not unicode_strings'; + is uc "\xdf", "\xdf", q|use Modern::Perl '2010' does not enable unicode_strings|; } if ($] >= 5.012) @@ -323,6 +386,27 @@ test_signatures_for( $year ); } +if ($] >= 5.036) +{ + my $year = 2023; + + test_no_switch_for( $year ); + test_no_indirect_for( $year ); + test_no_multidimensional_for( $year ); + + test_say_for( $year ); + test_state_for( $year ); + test_cur_sub_for( $year ); + test_array_base_for( $year ); + test_lexical_subs_for( $year ); + test_fc_for( $year ); + test_postderef_for( $year ); + test_unicode_strings_for( $year ); + test_signatures_for( $year ); + test_isa_for( $year ); + test_warnings_for( $year ); +} + eval 'sub { given (0) {} }'; isnt $@, "", 'switch feature does not leak out'; eval 'sub { say 0 }';