public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jitka Plesnikova <jplesnik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/perl-PPIx-EditorTools] rawhide: Adapt to PPI 1.286 (rhbz#2466964)
Date: Mon, 01 Jun 2026 10:29:36 GMT [thread overview]
Message-ID: <178030977659.1.8219768402834672895.rpms-perl-PPIx-EditorTools-22c885efb472@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/perl-PPIx-EditorTools
Branch : rawhide
Commit : 22c885efb472eaebf45a105500d29df8b93ef462
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-06-01T12:29:28+02:00
Stats : +48/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/perl-PPIx-EditorTools/c/22c885efb472eaebf45a105500d29df8b93ef462?branch=rawhide
Log:
Adapt to PPI 1.286 (rhbz#2466964)
---
diff --git a/PPIx-EditorTools-0.21-Adapt-to-PPI-1.286.patch b/PPIx-EditorTools-0.21-Adapt-to-PPI-1.286.patch
new file mode 100644
index 0000000..cd80264
--- /dev/null
+++ b/PPIx-EditorTools-0.21-Adapt-to-PPI-1.286.patch
@@ -0,0 +1,42 @@
+PPI 1.286 refactored PPI::Lexer::lex_source() for a performance fix (GH#318).
+The old version explicitly rejected undef input with
+"unless ( defined $source and not ref $source )". The new version removed
+this check, so PPI::Document->new(\undef) now returns a valid empty
+PPI::Document instead of failing.
+
+This caused PPIx::EditorTools::process_doc() to silently succeed when called
+without valid ppi or code arguments, because PPI::Document->new(\$code)
+with undef $code now creates a valid empty document.
+
+Fix by guarding the PPI::Document->new() call with a defined check on $code,
+and by dropping the @subs argument from use_ok() since the module doesn't
+export anything.
+
+Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
+
+--- PPIx-EditorTools-0.21/lib/PPIx/EditorTools.pm.orig 2017-12-24 22:34:39.000000000 +0100
++++ PPIx-EditorTools-0.21/lib/PPIx/EditorTools.pm 2026-05-29 13:28:44.035167976 +0200
+@@ -28,8 +28,10 @@ sub process_doc {
+ # TODO: inefficient to pass around full code/ppi
+ $self->code( $args{code} ) if $args{code};
+ my $code = $self->code;
+- $self->ppi( PPI::Document->new( \$code ) );
+- return 1 if $self->ppi && $self->ppi->isa('PPI::Document');
++ if (defined $code) {
++ $self->ppi( PPI::Document->new( \$code ) );
++ return 1 if $self->ppi && $self->ppi->isa('PPI::Document');
++ }
+
+ croak "arguments ppi or code required";
+ return;
+--- PPIx-EditorTools-0.21/t/00-ppix-editortools.t.orig 2017-12-24 22:34:39.000000000 +0100
++++ PPIx-EditorTools-0.21/t/00-ppix-editortools.t 2026-05-29 13:28:47.097227555 +0200
+@@ -32,7 +32,7 @@ foreach my $class (@classes) {
+ my $test_object = new_ok($class);
+ }
+
+-use_ok( 'PPIx::EditorTools', @subs );
++use_ok( 'PPIx::EditorTools' );
+
+ foreach my $subs (@subs) {
+ can_ok( 'PPIx::EditorTools', $subs );
diff --git a/perl-PPIx-EditorTools.spec b/perl-PPIx-EditorTools.spec
index 29c2b87..c25ce33 100644
--- a/perl-PPIx-EditorTools.spec
+++ b/perl-PPIx-EditorTools.spec
@@ -1,10 +1,11 @@
Name: perl-PPIx-EditorTools
Version: 0.21
-Release: 25%{?dist}
+Release: 26%{?dist}
Summary: Utility methods and base class for manipulating Perl via PPI
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/release/PPIx-EditorTools
Source0: https://cpan.metacpan.org/authors/id/Y/YA/YANICK/PPIx-EditorTools-%{version}.tar.gz
+Patch0: PPIx-EditorTools-0.21-Adapt-to-PPI-1.286.patch
BuildArch: noarch
BuildRequires: make
BuildRequires: perl-generators
@@ -48,6 +49,7 @@ from the Padre::Task::PPI code.
%prep
%setup -q -n PPIx-EditorTools-%{version}
+%patch -P0 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
@@ -66,6 +68,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Fri May 29 2026 Jitka Plesnikova <jplesnik@redhat.com> - 0.21-26
+- Adapt to PPI 1.286 (check for defined code before passing to PPI::Document->new)
+
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
reply other threads:[~2026-06-01 10:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178030977659.1.8219768402834672895.rpms-perl-PPIx-EditorTools-22c885efb472@fedoraproject.org \
--to=jplesnik@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox