Hello community, here is the log from the commit of package perl-Modern-Perl for openSUSE:Factory checked in at 2019-06-02 15:18:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Modern-Perl (Old) and /work/SRC/openSUSE:Factory/.perl-Modern-Perl.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Modern-Perl" Sun Jun 2 15:18:48 2019 rev:21 rq:706892 version:1.20190601 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Modern-Perl/perl-Modern-Perl.changes 2018-11-12 09:39:31.957351714 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Modern-Perl.new.5148/perl-Modern-Perl.changes 2019-06-02 15:18:52.226013667 +0200 @@ -1,0 +2,11 @@ +Sun Jun 2 05:12:47 UTC 2019 - Stephan Kulow <co...@suse.com> + +- updated to 1.20190601 + see /usr/share/doc/packages/perl-Modern-Perl/Changes + + 1.20190601 2019-06-01 09:19:36-07:00 America/Los_Angeles + - update for 2019 + - reduce scope of lexical %dates (RT #128406) + - support `perl -Modern::Perl=20xx` (RT #96319) + +------------------------------------------------------------------- Old: ---- Modern-Perl-1.20181021.tar.gz New: ---- Modern-Perl-1.20190601.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Modern-Perl.spec ++++++ --- /var/tmp/diff_new_pack.qpKSQS/_old 2019-06-02 15:18:52.650013484 +0200 +++ /var/tmp/diff_new_pack.qpKSQS/_new 2019-06-02 15:18:52.654013482 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Modern-Perl # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,10 +17,10 @@ Name: perl-Modern-Perl -Version: 1.20181021 +Version: 1.20190601 Release: 0 %define cpan_name Modern-Perl -Summary: Enable All of the Features of Modern Perl with One Import +Summary: Enable all of the features of Modern Perl with one import License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} @@ -47,10 +47,10 @@ %build perl Makefile.PL INSTALLDIRS=vendor -%{__make} %{?_smp_mflags} +make %{?_smp_mflags} %check -%{__make} test +make test %install %perl_make_install ++++++ Modern-Perl-1.20181021.tar.gz -> Modern-Perl-1.20190601.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/Changes new/Modern-Perl-1.20190601/Changes --- old/Modern-Perl-1.20181021/Changes 2018-10-21 21:09:33.000000000 +0200 +++ new/Modern-Perl-1.20190601/Changes 2019-06-01 18:19:37.000000000 +0200 @@ -1,5 +1,10 @@ Revision history for Modern::Perl +1.20190601 2019-06-01 09:19:36-07:00 America/Los_Angeles + - update for 2019 + - reduce scope of lexical %dates (RT #128406) + - support `perl -Modern::Perl=20xx` (RT #96319) + 1.20181021 2018-10-21 12:09:32-07:00 America/Los_Angeles - autogenerate META.json file (Mohammad S Anwar, GH PR #7) - remove Module::Build build dependency to make installation easier diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/MANIFEST new/Modern-Perl-1.20190601/MANIFEST --- old/Modern-Perl-1.20181021/MANIFEST 2018-10-21 21:09:33.000000000 +0200 +++ new/Modern-Perl-1.20190601/MANIFEST 2019-06-01 18:19:37.000000000 +0200 @@ -8,7 +8,9 @@ README dist.ini lib/Modern/Perl.pm +lib/odern/Perl.pm t/base.t +t/odern.t t/regressions.t t/unimport.t t/year_imports.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/META.json new/Modern-Perl-1.20190601/META.json --- old/Modern-Perl-1.20181021/META.json 2018-10-21 21:09:33.000000000 +0200 +++ new/Modern-Perl-1.20190601/META.json 2019-06-01 18:19:37.000000000 +0200 @@ -46,8 +46,8 @@ "web" : "https://github.com/chromatic/Modern-Perl" } }, - "version" : "1.20181021", - "x_generated_by_perl" : "v5.28.0", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.04" + "version" : "1.20190601", + "x_generated_by_perl" : "v5.30.0", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.11" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/META.yml new/Modern-Perl-1.20190601/META.yml --- old/Modern-Perl-1.20181021/META.yml 2018-10-21 21:09:33.000000000 +0200 +++ new/Modern-Perl-1.20190601/META.yml 2019-06-01 18:19:37.000000000 +0200 @@ -25,6 +25,6 @@ resources: homepage: https://github.com/chromatic/Modern-Perl repository: https://github.com/chromatic/Modern-Perl.git -version: '1.20181021' -x_generated_by_perl: v5.28.0 +version: '1.20190601' +x_generated_by_perl: v5.30.0 x_serialization_backend: 'YAML::Tiny version 1.73' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/Makefile.PL new/Modern-Perl-1.20190601/Makefile.PL --- old/Modern-Perl-1.20181021/Makefile.PL 2018-10-21 21:09:33.000000000 +0200 +++ new/Modern-Perl-1.20190601/Makefile.PL 2019-06-01 18:19:37.000000000 +0200 @@ -28,7 +28,7 @@ "TEST_REQUIRES" => { "Test::More" => "0.98" }, - "VERSION" => "1.20181021", + "VERSION" => "1.20190601", "test" => { "TESTS" => "t/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/lib/Modern/Perl.pm new/Modern-Perl-1.20190601/lib/Modern/Perl.pm --- old/Modern-Perl-1.20181021/lib/Modern/Perl.pm 2018-10-21 21:09:33.000000000 +0200 +++ new/Modern-Perl-1.20190601/lib/Modern/Perl.pm 2019-06-01 18:19:37.000000000 +0200 @@ -1,6 +1,6 @@ package Modern::Perl; # ABSTRACT: enable all of the features of Modern Perl with one import -$Modern::Perl::VERSION = '1.20181021'; +$Modern::Perl::VERSION = '1.20190601'; use 5.010_000; use strict; @@ -14,19 +14,18 @@ use IO::Handle (); my $wanted_date; -sub VERSION -{ + +sub VERSION { my ($self, $version) = @_; - return $Modern::Perl::VERSION || 2018 unless defined $version; - return $Modern::Perl::VERSION || 2018 if $version < 2009; + return $Modern::Perl::VERSION || 2019 unless defined $version; + return $Modern::Perl::VERSION || 2019 if $version < 2009; $wanted_date = $version if (caller(1))[3] =~ /::BEGIN/; - return 2018; + return 2019; } -sub import -{ +sub import { my ($class, $date) = @_; $date = $wanted_date unless defined $date; @@ -39,35 +38,31 @@ mro::set_mro( scalar caller(), 'c3' ); } -sub unimport -{ +sub unimport { warnings->unimport; strict->unimport; feature->unimport; } -my %dates = -( - 2009 => ':5.10', - 2010 => ':5.10', - 2011 => ':5.12', - 2012 => ':5.14', - 2013 => ':5.16', - 2014 => ':5.18', - 2015 => ':5.20', - 2016 => ':5.24', - 2017 => ':5.24', - 2018 => ':5.26', - 2019 => ':5.28', -); +sub validate_date { + my %dates = ( + 2009 => ':5.10', + 2010 => ':5.10', + 2011 => ':5.12', + 2012 => ':5.14', + 2013 => ':5.16', + 2014 => ':5.18', + 2015 => ':5.20', + 2016 => ':5.24', + 2017 => ':5.24', + 2018 => ':5.26', + 2019 => ':5.28', + ); -sub validate_date -{ my $date = shift; # always enable unicode_strings when available - unless ($date) - { + unless ($date) { return ':5.12' if $] > 5.011003; return ':5.10'; } @@ -93,7 +88,7 @@ =head1 VERSION -version 1.20181021 +version 1.20190601 =head1 SYNOPSIS @@ -120,6 +115,16 @@ L<http://onyxneon.com/books/modern_perl/index.html> for a freely-downloadable Modern Perl tutorial. +=head2 CLI Usage + +As of Modern::Perl 2019, you may also enable this pragma from the command line: + + $ perl -Modern::Perl -e "say 'Take that, awk!'" + +You may also enable year-specific features: + + $ perl -Modern::Perl=2020 -e "say 'Looking forward to Perl 5.30!'" + =head2 Wrapping Modern::Perl If you want to wrap Modern::Perl in your own C<import()> method, you can do so @@ -181,7 +186,7 @@ =head1 BUGS -None reported. +None known. Please report any bugs or feature requests to C<bug-modern-perl at rt.cpan.org>, or through the web interface at diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/lib/odern/Perl.pm new/Modern-Perl-1.20190601/lib/odern/Perl.pm --- old/Modern-Perl-1.20181021/lib/odern/Perl.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/Modern-Perl-1.20190601/lib/odern/Perl.pm 2019-06-01 18:19:37.000000000 +0200 @@ -0,0 +1,34 @@ +package odern::Perl; +$odern::Perl::VERSION = '1.20190601'; +use Modern::Perl; + +*import = \&Modern::Perl::import; + +1; + +__END__ + +=pod + +=encoding UTF-8 + +=head1 NAME + +odern::Perl + +=head1 VERSION + +version 1.20190601 + +=head1 AUTHOR + +chromatic + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2018 by chroma...@wgz.org. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/t/odern.t new/Modern-Perl-1.20190601/t/odern.t --- old/Modern-Perl-1.20181021/t/odern.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Modern-Perl-1.20190601/t/odern.t 2019-06-01 18:19:37.000000000 +0200 @@ -0,0 +1,18 @@ +#! perl + +use Test::More; + +use odern::Perl (); + +{ + eval "use odern::Perl; sub say { 0 }"; + is $@, "", 'use odern::Perl enables say'; +} + +{ + eval "use odern::Perl '3030'; ok( 0 )"; + like $@, qr/Unknown date '3030' requested/, + q|use odern::Perl '3030' throws year error|; +} + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Modern-Perl-1.20181021/t/year_imports.t new/Modern-Perl-1.20190601/t/year_imports.t --- old/Modern-Perl-1.20181021/t/year_imports.t 2018-10-21 21:09:33.000000000 +0200 +++ new/Modern-Perl-1.20190601/t/year_imports.t 2019-06-01 18:19:37.000000000 +0200 @@ -232,6 +232,36 @@ test_unicode_strings_for( $year ); } +if ($] >= 5.026) +{ + my $year = 2018; + + test_switch_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 ); +} + +if ($] >= 5.028) +{ + my $year = 2019; + + test_switch_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 ); +} + eval 'sub { given (0) {} }'; isnt $@, "", 'switch feature does not leak out'; eval 'sub { say 0 }';