From 12fcedf8ff46dcf63e2a7afc3d16581b46a05d35 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 03 2018 06:02:05 +0000 Subject: import rh-perl526-perl-Carp-1.42-395.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2616436 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Carp-1.38.tar.gz diff --git a/.rh-perl526-perl-Carp.metadata b/.rh-perl526-perl-Carp.metadata new file mode 100644 index 0000000..8d55e6f --- /dev/null +++ b/.rh-perl526-perl-Carp.metadata @@ -0,0 +1 @@ +6ad4e281ea94c3065c54237b03e1740b879fb6e5 SOURCES/Carp-1.38.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/Carp-1.38-Upgrade-to-1.40.patch b/SOURCES/Carp-1.38-Upgrade-to-1.40.patch new file mode 100644 index 0000000..1ea49a5 --- /dev/null +++ b/SOURCES/Carp-1.38-Upgrade-to-1.40.patch @@ -0,0 +1,118 @@ +diff --git a/Changes b/Changes +index b55b49f..dca6a52 100644 +--- a/Changes ++++ b/Changes +@@ -1,4 +1,12 @@ + ++version 1.40; 2016-03-10 ++ * Get arg_string.t to compile in perl v5.6 ++ * Add information for how to contribute to Carp. ++ ++version 1.39; 2016-03-06 ++ * bugfix: longmess() should return the error in scalar context ++ (CPANRT#107225) ++ + version 1.38; 2015-11-06 + * stable release of changes since v1.36 + +diff --git a/lib/Carp.pm b/lib/Carp.pm +index 9421c74..92f8866 100644 +--- a/lib/Carp.pm ++++ b/lib/Carp.pm +@@ -87,7 +87,7 @@ BEGIN { + } + } + +-our $VERSION = '1.38'; ++our $VERSION = '1.40'; + $VERSION =~ tr/_//d; + + our $MaxEvalLen = 0; +@@ -445,7 +445,9 @@ sub long_error_loc { + } + + sub longmess_heavy { +- return @_ if ref( $_[0] ); # don't break references as exceptions ++ if ( ref( $_[0] ) ) { # don't break references as exceptions ++ return wantarray ? @_ : $_[0]; ++ } + my $i = long_error_loc(); + return ret_backtrace( $i, @_ ); + } +@@ -906,6 +908,12 @@ call die() or warn(), as appropriate. + L, + L + ++=head1 CONTRIBUTING ++ ++L is maintained by the perl 5 porters as part of the core perl 5 ++version control repository. Please see the L perldoc for how to ++submit patches and contribute to it. ++ + =head1 AUTHOR + + The Carp module first appeared in Larry Wall's perl 5.000 distribution. +diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm +index 91a42d1..b05d758 100644 +--- a/lib/Carp/Heavy.pm ++++ b/lib/Carp/Heavy.pm +@@ -2,7 +2,7 @@ package Carp::Heavy; + + use Carp (); + +-our $VERSION = '1.38'; ++our $VERSION = '1.40'; + $VERSION =~ tr/_//d; + + # Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions +diff --git a/t/Carp.t b/t/Carp.t +index a18e3b4..9ecdf88 100644 +--- a/t/Carp.t ++++ b/t/Carp.t +@@ -3,7 +3,7 @@ no warnings "once"; + use Config; + + use IPC::Open3 1.0103 qw(open3); +-use Test::More tests => 65; ++use Test::More tests => 66; + + sub runperl { + my(%args) = @_; +@@ -39,6 +39,24 @@ BEGIN { + ); + } + ++package MyClass; ++ ++sub new { return bless +{ field => ['value1', 'SecondVal'] }; } ++ ++package main; ++ ++{ ++ my $err = Carp::longmess(MyClass->new); ++ ++ # See: ++ # https://rt.cpan.org/Public/Bug/Display.html?id=107225 ++ is_deeply( ++ $err->{field}, ++ ['value1', 'SecondVal',], ++ "longmess returns sth meaningful in scalar context when passed a ref.", ++ ); ++} ++ + { + local $SIG{__WARN__} = sub { + like $_[0], qr/ok (\d+)\n at.+\b(?i:carp\.t) line \d+\.$/, 'ok 2\n'; +diff --git a/t/arg_string.t b/t/arg_string.t +index 42b43b1..dbd2e6e 100644 +--- a/t/arg_string.t ++++ b/t/arg_string.t +@@ -15,7 +15,7 @@ my $e9 = sprintf "%02x", (($] ge 5.007_003) + : ((ord("A") == 193) + ? 0x51 + : 0xE9)); +-my $chr_e9 = chr utf8::unicode_to_native(0xe9); ++my $chr_e9 = chr eval "0x$e9"; + my $nl_as_hex = sprintf "%x", ord("\n"); + + like lm(3), qr/main::lm\(3\)/; diff --git a/SOURCES/Carp-1.40-Upgrade-to-1.42.patch b/SOURCES/Carp-1.40-Upgrade-to-1.42.patch new file mode 100644 index 0000000..b85353e --- /dev/null +++ b/SOURCES/Carp-1.40-Upgrade-to-1.42.patch @@ -0,0 +1,128 @@ +From 7cdc0cd3cf5f9fd6459daa746db8f647c14ef9fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 11 May 2017 08:43:33 +0200 +Subject: [PATCH] Upgrade to 1.42 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Unbundled from perl-5.25.12. + +Signed-off-by: Petr Písař +--- + lib/Carp.pm | 6 +++--- + lib/Carp/Heavy.pm | 2 +- + t/Carp.t | 13 ++++++++++++- + t/arg_string.t | 10 +++++++++- + 4 files changed, 25 insertions(+), 6 deletions(-) + +diff --git a/lib/Carp.pm b/lib/Carp.pm +index 92f8866..05052b9 100644 +--- a/lib/Carp.pm ++++ b/lib/Carp.pm +@@ -87,7 +87,7 @@ BEGIN { + } + } + +-our $VERSION = '1.40'; ++our $VERSION = '1.42'; + $VERSION =~ tr/_//d; + + our $MaxEvalLen = 0; +@@ -474,7 +474,7 @@ sub ret_backtrace { + eval { + CORE::die; + }; +- if($@ =~ /^Died at .*(, <.*?> line \d+).$/ ) { ++ if($@ =~ /^Died at .*(, <.*?> (?:line|chunk) \d+).$/ ) { + $mess .= $1; + } + } +@@ -636,7 +636,7 @@ Carp - alternative warn and die for modules + + # cluck, longmess and shortmess not exported by default + use Carp qw(cluck longmess shortmess); +- cluck "This is how we got here!"; ++ cluck "This is how we got here!"; # warn with stack backtrace + $long_message = longmess( "message from cluck() or confess()" ); + $short_message = shortmess( "message from carp() or croak()" ); + +diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm +index b05d758..f9c584a 100644 +--- a/lib/Carp/Heavy.pm ++++ b/lib/Carp/Heavy.pm +@@ -2,7 +2,7 @@ package Carp::Heavy; + + use Carp (); + +-our $VERSION = '1.40'; ++our $VERSION = '1.42'; + $VERSION =~ tr/_//d; + + # Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions +diff --git a/t/Carp.t b/t/Carp.t +index 9ecdf88..65daed7 100644 +--- a/t/Carp.t ++++ b/t/Carp.t +@@ -3,7 +3,7 @@ no warnings "once"; + use Config; + + use IPC::Open3 1.0103 qw(open3); +-use Test::More tests => 66; ++use Test::More tests => 67; + + sub runperl { + my(%args) = @_; +@@ -442,6 +442,16 @@ $@ =~ s/\n.*//; # just check first line + is $@, "heek at ".__FILE__." line ".(__LINE__-2).", line 2.\n", + 'last handle line num is mentioned'; + ++# [cpan #100183] ++{ ++ local $/ = \6; ++ ; ++ eval { croak 'jeek' }; ++ $@ =~ s/\n.*//; # just check first line ++ is $@, "jeek at ".__FILE__." line ".(__LINE__-2).", chunk 3.\n", ++ 'last handle chunk num is mentioned'; ++} ++ + SKIP: + { + skip "IPC::Open3::open3 needs porting", 1 if $Is_VMS; +@@ -531,3 +541,4 @@ __DATA__ + 1 + 2 + 3 ++abcdefghijklmnopqrstuvwxyz +diff --git a/t/arg_string.t b/t/arg_string.t +index dbd2e6e..dc70f43 100644 +--- a/t/arg_string.t ++++ b/t/arg_string.t +@@ -1,6 +1,8 @@ + use warnings; + use strict; + ++# confirm that stack args are displayed correctly by longmess() ++ + use Test::More tests => 32; + + use Carp (); +@@ -22,7 +24,13 @@ like lm(3), qr/main::lm\(3\)/; + like lm(substr("3\x{2603}", 0, 1)), qr/main::lm\(3\)/; + like lm(-3), qr/main::lm\(-3\)/; + like lm(-3.5), qr/main::lm\(-3\.5\)/; +-like lm(-3.5e100), qr/main::lm\(-3\.5[eE]\+?100\)/; ++like lm(-3.5e30), ++ qr/main::lm\( ++ ( ++ -3500000000000000000000000000000 ++ | -3\.5[eE]\+?0?30 ++ ) ++ \) /x; + like lm(""), qr/main::lm\(""\)/; + like lm("foo"), qr/main::lm\("foo"\)/; + like lm("a\$b\@c\\d\"e"), qr/main::lm\("a\\\$b\\\@c\\\\d\\\"e"\)/; +-- +2.9.3 + diff --git a/SPECS/perl-Carp.spec b/SPECS/perl-Carp.spec new file mode 100644 index 0000000..b4cf120 --- /dev/null +++ b/SPECS/perl-Carp.spec @@ -0,0 +1,164 @@ +%{?scl:%scl_package perl-Carp} + +%global cpan_version 1.38 + +Name: %{?scl_prefix}perl-Carp +Version: 1.42 +Release: 395%{?dist} +Summary: Alternative warn and die for modules +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/Carp/ +Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Carp-%{cpan_version}.tar.gz +# Unbundled from perl 5.24.0 +Patch0: Carp-1.38-Upgrade-to-1.40.patch +# Unbundled from perl 5.25.12 +Patch1: Carp-1.40-Upgrade-to-1.42.patch +BuildArch: noarch +BuildRequires: make +BuildRequires: %{?scl_prefix}perl-interpreter +BuildRequires: %{?scl_prefix}perl-generators +BuildRequires: %{?scl_prefix}perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: %{?scl_prefix}perl(warnings) +BuildRequires: %{?scl_prefix}perl(strict) +# Run-time: +BuildRequires: %{?scl_prefix}perl(Exporter) +# Tests: +BuildRequires: %{?scl_prefix}perl(B) +BuildRequires: %{?scl_prefix}perl(Config) +BuildRequires: %{?scl_prefix}perl(Data::Dumper) +# IPC::Open3 >= 1.0103 in reality, but the provides is 2-digit number only +BuildRequires: %{?scl_prefix}perl(IPC::Open3) +BuildRequires: %{?scl_prefix}perl(overload) +BuildRequires: %{?scl_prefix}perl(Test::More) >= 0.47 +Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%(%{?scl:scl enable %{scl} '}eval "$(perl -V:version)";echo $version%{?scl:'})) + +# Do not export private DB module stub +%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^%{?scl_prefix}perl\\(DB\\) + +%description +The Carp routines are useful in your own modules because they act like +die() or warn(), but with a message which is more likely to be useful to a +user of your module. In the case of cluck, confess, and longmess that +context is a summary of every call in the call-stack. For a shorter message +you can use carp or croak which report the error as being from where your +module was called. There is no guarantee that that is where the error was, +but it is a good educated guess. + +%prep +%setup -q -n Carp-%{cpan_version} +%patch0 -p1 +%patch1 -p1 + +%build +%{?scl:scl enable %{scl} '}perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 && make %{?_smp_mflags}%{?scl:'} + +%install +%{?scl:scl enable %{scl} '}make pure_install DESTDIR=$RPM_BUILD_ROOT%{?scl:'} +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +%{?scl:scl enable %{scl} '}make test%{?scl:'} + +%files +%doc Changes README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Mon Dec 18 2017 Petr Pisar - 1.42-395 +- SCL + +* Thu Jul 27 2017 Fedora Release Engineering - 1.42-394 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Jun 03 2017 Jitka Plesnikova - 1.42-393 +- Perl 5.26 rebuild + +* Thu May 11 2017 Petr Pisar - 1.42-1 +- Upgrade to 1.42 as provided in perl-5.25.12 + +* Sat Feb 11 2017 Fedora Release Engineering - 1.40-366 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat May 14 2016 Jitka Plesnikova - 1.40-365 +- Increase release to favour standalone package + +* Wed May 11 2016 Jitka Plesnikova - 1.40-1 +- 1.40 bump in order to dual-live with perl 5.24 + +* Thu Feb 04 2016 Fedora Release Engineering - 1.38-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Nov 10 2015 Petr Pisar - 1.38-1 +- 1.38 bump + +* Thu Jun 18 2015 Fedora Release Engineering - 1.36-346 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 04 2015 Jitka Plesnikova - 1.36-345 +- Increase release to favour standalone package + +* Wed Jun 03 2015 Jitka Plesnikova - 1.36-2 +- Perl 5.22 rebuild + +* Fri Mar 20 2015 Petr Pisar - 1.36-1 +- 1.36 bump + +* Mon Mar 16 2015 Petr Pisar - 1.35-1 +- 1.35 bump + +* Wed Sep 03 2014 Jitka Plesnikova - 1.33.01-310 +- Increase release to favour standalone package + +* Tue Aug 26 2014 Jitka Plesnikova - 1.33.01-3 +- Perl 5.20 rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.33.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Apr 04 2014 Petr Pisar - 1.33.01-1 +- 1.3301 bump + +* Wed Mar 26 2014 Petr Pisar - 1.33-1 +- 1.33 bump + +* Tue Sep 10 2013 Petr Pisar - 1.32-1 +- 1.32 bump + +* Sat Aug 03 2013 Fedora Release Engineering - 1.26-245 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jul 12 2013 Petr Pisar - 1.26-244 +- Link minimal build-root packages against libperl.so explicitly + +* Tue Apr 30 2013 Petr Pisar - 1.26-243 +- Increase release number to supersede perl sub-package (bug #957931) + +* Thu Feb 14 2013 Fedora Release Engineering - 1.26-241 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Aug 13 2012 Marcela Mašláňová - 1.26-240 +- Bump release to override sub-package from perl.spec + +* Fri Jul 20 2012 Fedora Release Engineering - 1.26-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jun 28 2012 Petr Pisar - 1.26-2 +- Perl 5.16 rebuild + +* Tue Jun 19 2012 Petr Pisar - 1.26-1 +- 1.26 bump + +* Wed Jun 06 2012 Petr Pisar - 1.25-2 +- Perl 5.16 rebuild + +* Thu Mar 15 2012 Petr Pisar - 1.25-1 +- 1.25 bump + +* Fri Jan 13 2012 Fedora Release Engineering - 1.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Sep 07 2011 Petr Pisar 1.22-1 +- Specfile autogenerated by cpanspec 1.78. +- Remove BuildRoot and defattr code from spec +- Do not export private module DB