Compare commits

...

No commits in common. "imports/c8-beta-stream-5.24/perl-Carp-1.40-367.module+el8.1.0+2926+ce7246ad" and "c8-stream-5.3" have entirely different histories.

4 changed files with 42 additions and 142 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/Carp-1.38.tar.gz
SOURCES/Carp-1.50.tar.gz

View File

@ -1 +1 @@
6ad4e281ea94c3065c54237b03e1740b879fb6e5 SOURCES/Carp-1.38.tar.gz
309973bc0c27f7a186a307c0f243cac36101d229 SOURCES/Carp-1.50.tar.gz

View File

@ -1,118 +0,0 @@
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<Carp::Always>,
L<Carp::Clan>
+=head1 CONTRIBUTING
+
+L<Carp> is maintained by the perl 5 porters as part of the core perl 5
+version control repository. Please see the L<perlhack> 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\)/;

View File

@ -1,27 +1,17 @@
%global cpan_version 1.38
Name: perl-Carp
# Keep 2-digit precision
#Version: %%(echo '%%{cpan_version}' | sed 's/\(\...\)\(.\)/\1.\2/')
Version: 1.40
Release: 367%{?dist}
Version: 1.50
Release: 439%{?dist}
Summary: Alternative warn and die for modules
License: GPL+ or Artistic
Group: Development/Libraries
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
URL: https://metacpan.org/release/Carp
Source0: https://cpan.metacpan.org/authors/id/X/XS/XSAWYERX/Carp-%{version}.tar.gz
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(warnings)
BuildRequires: perl(strict)
BuildRequires: sed
# Run-time:
BuildRequires: perl(Exporter)
# Tests:
@ -47,16 +37,14 @@ 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
%setup -q -n Carp-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
@ -68,8 +56,38 @@ make test
%{_mandir}/man3/*
%changelog
* Fri Mar 29 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.40-367
- Rebuild with enable hardening (bug #1636329)
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-439
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-438
- Increase release to favour standalone package
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-418
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-417
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 26 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-416
- Increase release to favour standalone package
* Wed May 23 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-1
- Upgrade to 1.50 as provided in perl-5.28.0
* Fri Apr 20 2018 Petr Pisar <ppisar@redhat.com> - 1.42-396
- Prevent from some stack-not-ref-counted crashes in Carp (RT#52610)
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.42-395
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.42-394
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.42-393
- Perl 5.26 rebuild
* Thu May 11 2017 Petr Pisar <ppisar@redhat.com> - 1.42-1
- Upgrade to 1.42 as provided in perl-5.25.12
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.40-366
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild