From 1fa65bad94c8e94712518bdd84f0bc0e70ca2ba1 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Wed, 3 Jan 2024 11:12:34 +0100 Subject: [PATCH] 5.78 bump (rhbz#2256294) --- .gitignore | 1 + Exporter-5.74-Upgrade-to-5.76.patch | 203 ---------------------------- Exporter-5.74-Upgrade-to-5.77.patch | 167 ----------------------- perl-Exporter.spec | 19 +-- sources | 2 +- 5 files changed, 12 insertions(+), 380 deletions(-) delete mode 100644 Exporter-5.74-Upgrade-to-5.76.patch delete mode 100644 Exporter-5.74-Upgrade-to-5.77.patch diff --git a/.gitignore b/.gitignore index 59716ad..0781a95 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /Exporter-5.68.tar.gz /Exporter-5.70.tar.gz /Exporter-5.74.tar.gz +/Exporter-5.78.tar.gz diff --git a/Exporter-5.74-Upgrade-to-5.76.patch b/Exporter-5.74-Upgrade-to-5.76.patch deleted file mode 100644 index f3b4ee1..0000000 --- a/Exporter-5.74-Upgrade-to-5.76.patch +++ /dev/null @@ -1,203 +0,0 @@ -From 1a654c6b6248afd9dfe94ac6f11bd0ac23a80c73 Mon Sep 17 00:00:00 2001 -From: Jitka Plesnikova -Date: Wed, 5 May 2021 22:23:24 +0200 -Subject: [PATCH] Upgrade to 5.76 - ---- - lib/Exporter.pm | 11 ++++------ - lib/Exporter/Heavy.pm | 2 +- - t/Exporter.t | 48 +++++++++++++++++++++++-------------------- - t/warn.t | 3 ++- - 4 files changed, 33 insertions(+), 31 deletions(-) - -diff --git a/lib/Exporter.pm b/lib/Exporter.pm -index 19d7645..28a6873 100644 ---- a/lib/Exporter.pm -+++ b/lib/Exporter.pm -@@ -1,16 +1,13 @@ - package Exporter; - --require 5.006; -- --# Be lean. --#use strict; --#no strict 'refs'; -+use strict; -+no strict 'refs'; - - our $Debug = 0; - our $ExportLevel = 0; - our $Verbose ||= 0; --our $VERSION = '5.74'; --our (%Cache); -+our $VERSION = '5.76'; -+our %Cache; - - sub as_heavy { - require Exporter::Heavy; -diff --git a/lib/Exporter/Heavy.pm b/lib/Exporter/Heavy.pm -index 004815e..404b4c1 100644 ---- a/lib/Exporter/Heavy.pm -+++ b/lib/Exporter/Heavy.pm -@@ -4,7 +4,7 @@ use strict; - no strict 'refs'; - - # On one line so MakeMaker will see it. --require Exporter; our $VERSION = $Exporter::VERSION; -+our $VERSION = '5.76'; - - =head1 NAME - -diff --git a/t/Exporter.t b/t/Exporter.t -index 0518080..2fcd003 100644 ---- a/t/Exporter.t -+++ b/t/Exporter.t -@@ -1,5 +1,8 @@ - #!perl -w - -+use strict; -+use warnings; -+ - # Can't use Test::Simple/More, they depend on Exporter. - my $test; - sub ok ($;$) { -@@ -18,39 +21,36 @@ sub ok ($;$) { - - BEGIN { - $test = 1; -- print "1..33\n"; -+ print "1..34\n"; - require Exporter; - ok( 1, 'Exporter compiled' ); - } - - --BEGIN { -- # Methods which Exporter says it implements. -- @Exporter_Methods = qw(import -+our @Exporter_Methods = qw(import - export_to_level - require_version - export_fail - ); --} - - - package Testing; - require Exporter; --@ISA = qw(Exporter); -+our @ISA = qw(Exporter); - - # Make sure Testing can do everything its supposed to. - foreach my $meth (@::Exporter_Methods) { - ::ok( Testing->can($meth), "subclass can $meth()" ); - } - --%EXPORT_TAGS = ( -+our %EXPORT_TAGS = ( - This => [qw(stuff %left)], - That => [qw(Above the @wailing)], - tray => [qw(Fasten $seatbelt)], - ); --@EXPORT = qw(lifejacket is); --@EXPORT_OK = qw(under &your $seat); --$VERSION = '1.05'; -+our @EXPORT = qw(lifejacket is); -+our @EXPORT_OK = qw(under &your $seat); -+our $VERSION = '1.05'; - - ::ok( Testing->require_version(1.05), 'require_version()' ); - eval { Testing->require_version(1.11); 1 }; -@@ -168,15 +168,15 @@ Testing->import('!/e/'); - - - package More::Testing; --@ISA = qw(Exporter); --$VERSION = 0; -+our @ISA = qw(Exporter); -+our $VERSION = 0; - eval { More::Testing->require_version(0); 1 }; - ::ok(!$@, 'require_version(0) and $VERSION = 0'); - - - package Yet::More::Testing; --@ISA = qw(Exporter); --$VERSION = 0; -+our @ISA = qw(Exporter); -+our $VERSION = 0; - eval { Yet::More::Testing->require_version(10); 1 }; - ::ok($@ !~ /\(undef\)/, 'require_version(10) and $VERSION = 0'); - -@@ -185,8 +185,8 @@ my $warnings; - BEGIN { - local $SIG{__WARN__} = sub { $warnings = join '', @_ }; - package Testing::Unused::Vars; -- @ISA = qw(Exporter); -- @EXPORT = qw(this $TODO that); -+ our @ISA = qw(Exporter); -+ our @EXPORT = qw(this $TODO that); - - package Foo; - Testing::Unused::Vars->import; -@@ -196,8 +196,8 @@ BEGIN { - print "# $warnings\n"; - - package Moving::Target; --@ISA = qw(Exporter); --@EXPORT_OK = qw (foo); -+our @ISA = qw(Exporter); -+our @EXPORT_OK = qw (foo); - - sub foo {"This is foo"}; - sub bar {"This is bar"}; -@@ -215,12 +215,11 @@ Moving::Target->import ('bar'); - ::ok (bar() eq "This is bar", "imported bar after EXPORT_OK changed"); - - package The::Import; -- - use Exporter 'import'; - - ::ok(\&import == \&Exporter::import, "imported the import routine"); - --@EXPORT = qw( wibble ); -+our @EXPORT = qw( wibble ); - sub wibble {return "wobble"}; - - package Use::The::Import; -@@ -238,8 +237,8 @@ eval { Carp::croak() }; - - package Exporter::for::Tied::_; - --@ISA = 'Exporter'; --@EXPORT = 'foo'; -+our @ISA = 'Exporter'; -+our @EXPORT = 'foo'; - - package Tied::_; - -@@ -253,3 +252,8 @@ sub TIESCALAR{bless[]} - } - } - ::ok(1, 'import with tied $_'); -+ -+# this should be loaded, but make sure -+require Exporter::Heavy; -+::ok(Exporter->VERSION eq Exporter::Heavy->VERSION, -+ 'Exporter and Exporter::Heavy have matching versions'); -diff --git a/t/warn.t b/t/warn.t -index 3010964..2186674 100644 ---- a/t/warn.t -+++ b/t/warn.t -@@ -25,7 +25,8 @@ BEGIN { - - package Foo; - Exporter->import("import"); --@EXPORT_OK = "bar"; -+our @EXPORT_OK = qw/bar/; -+ - - package main; - --- -2.30.2 - diff --git a/Exporter-5.74-Upgrade-to-5.77.patch b/Exporter-5.74-Upgrade-to-5.77.patch deleted file mode 100644 index 171e92c..0000000 --- a/Exporter-5.74-Upgrade-to-5.77.patch +++ /dev/null @@ -1,167 +0,0 @@ -From f40af8ab82768c5b20bdd13592288d7457a57c84 Mon Sep 17 00:00:00 2001 -From: Jitka Plesnikova -Date: Wed, 11 May 2022 15:29:05 +0200 -Subject: [PATCH] Upgrade to 5.77 - ---- - lib/Exporter.pm | 45 +++++++++++++++++++++++++++++-------------- - lib/Exporter/Heavy.pm | 2 +- - t/pod.t | 7 ------- - t/use.t | 8 -------- - 4 files changed, 32 insertions(+), 30 deletions(-) - delete mode 100644 t/pod.t - delete mode 100644 t/use.t - -diff --git a/lib/Exporter.pm b/lib/Exporter.pm -index 28a6873..ab3cfd7 100644 ---- a/lib/Exporter.pm -+++ b/lib/Exporter.pm -@@ -6,7 +6,7 @@ no strict 'refs'; - our $Debug = 0; - our $ExportLevel = 0; - our $Verbose ||= 0; --our $VERSION = '5.76'; -+our $VERSION = '5.77'; - our %Cache; - - sub as_heavy { -@@ -101,15 +101,21 @@ Exporter - Implements default import method for modules - - In module F: - -+ package YourModule; -+ use Exporter 'import'; -+ our @EXPORT_OK = qw(munge frobnicate); # symbols to export on request -+ -+or -+ - package YourModule; - require Exporter; -- our @ISA = qw(Exporter); -+ our @ISA = qw(Exporter); # inherit all of Exporter's methods - our @EXPORT_OK = qw(munge frobnicate); # symbols to export on request - - or - - package YourModule; -- use Exporter 'import'; # gives you Exporter's import() method directly -+ use parent 'Exporter'; # inherit all of Exporter's methods - our @EXPORT_OK = qw(munge frobnicate); # symbols to export on request - - In other files which wish to use C: -@@ -143,8 +149,8 @@ symbols can represent functions, scalars, arrays, hashes, or typeglobs. - The symbols must be given by full name with the exception that the - ampersand in front of a function is optional, e.g. - -- our @EXPORT = qw(afunc $scalar @array); # afunc is a function -- our @EXPORT_OK = qw(&bfunc %hash *typeglob); # explicit prefix on &bfunc -+ our @EXPORT = qw(afunc $scalar @array); # afunc is a function -+ our @EXPORT_OK = qw(&bfunc %hash *typeglob); # explicit prefix on &bfunc - - If you are only exporting function names it is recommended to omit the - ampersand, as the implementation is faster this way. -@@ -309,7 +315,7 @@ Note: Be careful not to modify C<@_> at all before you call export_to_level - - By including Exporter in your C<@ISA> you inherit an Exporter's import() method - but you also inherit several other helper methods which you probably don't --want. To avoid this you can do: -+want and complicate the inheritance tree. To avoid this you can do: - - package YourModule; - use Exporter qw(import); -@@ -473,8 +479,8 @@ This may happen for instance with mutually recursive - modules, which are affected by the time the relevant - constructions are executed. - --The ideal (but a bit ugly) way to never have to think --about that is to use C blocks. So the first part -+The ideal way to never have to think about that is to use -+C blocks and the simple import method. So the first part - of the L code could be rewritten as: - - package YourModule; -@@ -482,16 +488,27 @@ of the L code could be rewritten as: - use strict; - use warnings; - -- our (@ISA, @EXPORT_OK); -+ use Exporter 'import'; -+ BEGIN { -+ our @EXPORT_OK = qw(munge frobnicate); # symbols to export on request -+ } -+ -+Or if you need to inherit from Exporter: -+ -+ package YourModule; -+ -+ use strict; -+ use warnings; -+ - BEGIN { -- require Exporter; -- @ISA = qw(Exporter); -- @EXPORT_OK = qw(munge frobnicate); # symbols to export on request -+ require Exporter; -+ our @ISA = qw(Exporter); # inherit all of Exporter's methods -+ our @EXPORT_OK = qw(munge frobnicate); # symbols to export on request - } - - The C will assure that the loading of F - and the assignments to C<@ISA> and C<@EXPORT_OK> happen --immediately, leaving no room for something to get awry -+immediately like C, leaving no room for something to get awry - or just plain wrong. - - With respect to loading C and inheriting, there -@@ -502,7 +519,7 @@ are alternatives with the use of modules like C and C. - use parent qw(Exporter); - - Any of these statements are nice replacements for --C -+C - with the same compile-time effect. The basic difference - is that C code interacts with declared C - while C is a streamlined version of the older -diff --git a/lib/Exporter/Heavy.pm b/lib/Exporter/Heavy.pm -index 404b4c1..338aae3 100644 ---- a/lib/Exporter/Heavy.pm -+++ b/lib/Exporter/Heavy.pm -@@ -4,7 +4,7 @@ use strict; - no strict 'refs'; - - # On one line so MakeMaker will see it. --our $VERSION = '5.76'; -+our $VERSION = '5.77'; - - =head1 NAME - -diff --git a/t/pod.t b/t/pod.t -deleted file mode 100644 -index 9cc6f96..0000000 ---- a/t/pod.t -+++ /dev/null -@@ -1,7 +0,0 @@ -- --use strict; --use Test::More; --eval "use Test::Pod 1.18"; --plan skip_all => "Test::Pod 1.18 required for testing POD" if $@; -- --all_pod_files_ok(all_pod_files(".")); -diff --git a/t/use.t b/t/use.t -deleted file mode 100644 -index 00d1ae7..0000000 ---- a/t/use.t -+++ /dev/null -@@ -1,8 +0,0 @@ -- --print "1..1\n"; -- --my $ok; --BEGIN { eval "use Exporter;"; $ok = !$@; } --print( ($ok ? '' : 'not '), "ok - use Exporter;\n" ); -- --print( "# Testing Exporter $Exporter::VERSION, Perl $], $^X\n" ); --- -2.34.3 - diff --git a/perl-Exporter.spec b/perl-Exporter.spec index 331980f..ad54f12 100644 --- a/perl-Exporter.spec +++ b/perl-Exporter.spec @@ -1,16 +1,12 @@ -%global base_version 5.74 +%global base_version 5.78 Name: perl-Exporter -Version: 5.77 -Release: 501%{?dist} +Version: 5.78 +Release: 1%{?dist} Summary: Implements default import method for modules License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Exporter Source0: https://cpan.metacpan.org/authors/id/T/TO/TODDR/Exporter-%{base_version}.tar.gz -# Unbundled from perl 5.34.0 -Patch0: Exporter-5.74-Upgrade-to-5.76.patch -# Unbundled from perl 5.35.11 -Patch1: Exporter-5.74-Upgrade-to-5.77.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: make @@ -45,8 +41,10 @@ with "%{_libexecdir}/%{name}/test". %prep %setup -q -n Exporter-%{base_version} -%patch -P0 -p1 -%patch -P1 -p1 +# Remove optional author test to prevent cycle Exporter <-> Test::More +rm t/pod.t +perl -i -ne 'print $_ unless m{^t/pod.t}' MANIFEST + # Help generators to recognize Perl scripts for F in t/*.t; do perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F" @@ -82,6 +80,9 @@ make test %{_libexecdir}/%{name} %changelog +* Wed Jan 03 2024 Jitka Plesnikova - 5.78-1 +- 5.78 bump (rhbz#2256294) + * Fri Sep 22 2023 Jitka Plesnikova - 5.77-501 - Package tests diff --git a/sources b/sources index b4a14a3..9828122 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Exporter-5.74.tar.gz) = e5233d2851f456a15b3e79069e45edac657898d4ce423ae9942767ce02d873ce1be10f995f0a3b10b66095ac5fe742c21585928d00f63eddb528a6c4a994e6fc +SHA512 (Exporter-5.78.tar.gz) = e3fb5b64902dd5ca4f0222a7204d76c87da3657cf2f3c1833e5ff8c5dfd47669d47be5ea5d1a87ef6c4aa747bbfe4375ec23ee0ccb8fa2420093f677e3917fef