Bug 2310796

Summary: perl-Sub-HandlesVia-0.050000-6.fc42 FTBFS: 'has' is no longer supported; use 'field' instead at t/50objectpad.t line 11
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: perl-Sub-HandlesViaAssignee: Ralf Corsepius <rc040203>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: rc040203
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-Sub-HandlesVia-0.050000-7.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-09-10 06:51:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2300528    

Description Petr Pisar 2024-09-09 07:58:47 UTC
perl-Sub-HandlesVia-0.050000-6.fc42 fails to build in Fedora 42 because a test fails:

t/50objectpad.t ........................ 'has' is no longer supported; use 'field' instead at t/50objectpad.t line 11, near "  has "
t/50objectpad.t ........................ Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run

This is triggered by upgrading perl-Object-Pad from 0.812-1.fc42 to 0.813-1.fc42. Object-Pad intentionally removed support for "has" keyword:

0.813   2024-09-03
        [CHANGES]
         * Removed the `has` keyword; it now immediately throws a compiletime
           error

Comment 1 Ralf Corsepius 2024-09-09 11:34:57 UTC
I think, this patch to the spec should fix this issue:

@@ -58,6 +58,10 @@ you should have a fairly good idea what this does.
 
 %prep
 %setup -q -n Sub-HandlesVia-%{version}
+# Work-around RHBZ#2310796
+# 'has' is no longer supported; use 'field' instead
+# API change in Object::Pad >= 0.813
+sed -i -e 's,has,field,' t/50objectpad.t
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1


However, I am more worried about further issues this change to Object::Pad may have elsewhere.

Comment 2 Fedora Update System 2024-09-10 06:30:33 UTC
FEDORA-2024-b3bbe4c929 (perl-Sub-HandlesVia-0.050000-7.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-b3bbe4c929

Comment 3 Fedora Update System 2024-09-10 08:05:51 UTC
FEDORA-2024-b3bbe4c929 (perl-Sub-HandlesVia-0.050000-7.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.