https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40680

            Bug ID: 40680
           Summary: Many warnings on Perl 5.40 due to importing methods
                    from not yet defined packages
 Change sponsored?: ---
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

Cause of the issue:
https://metacpan.org/release/HAARG/perl-5.40.0/view/pod/perldelta.pod#Calling-the-import-method-of-an-unknown-package-produces-a-warning

It's a problem with the fresh Debian 13. (it's time we have actual support, CI
for it was disabled due to some other issue) 
Ubuntu 24.04 has perl 5.38 so it works cleanly. But the next in 2026 will also
have this issue.

== Test plan ==
1. Start a Debian 13 Koha: KOHA_IMAGE=main-trixie ktd up
2. Tons of warnings on start but it ends up starting (see end of this message
for the warnings)
3. perl -c mainpage.pl
4. Tons of warnings again
5. restart_all
6. Tons of warnings again
7. Things seem to work though (checkout, checkin, search in staff and OPAC)


== Severity==
Critical because it looks like Koha is broken. And it will hide actual issues.

One case in chat from someone upgrading. And us thinking there is really
something broken given their output:
https://chat.koha-community.org/koha-community/pl/gd8xbsx4p3gadpnk5h8c9n3bzy
  follow-up:
https://chat.koha-community.org/koha-community/pl/w71jx511ppf59cfqezgy1fpcrc


And me who though my KTD failed to fully start. And when investigating, when
running a test, it looked at first as if it failed. But no it works.


== warnings ==

Attempt to call undefined import method with arguments ("get_session") via
package "C4::Auth" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/Search/History.pm line 5.
Attempt to call undefined import method with arguments ("output_and_exit") via
package "C4::Output" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/Auth.pm line 35.
Attempt to call undefined import method with arguments ("GetNormalizedISBN"
...) via package "C4::Koha" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Biblio.pm line 27.
Attempt to call undefined import method with arguments ("haspermission") via
package "C4::Auth" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/Serials.pm line 37.
Attempt to call undefined import method with arguments ("UpdateStats") via
package "C4::Stats" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/Circulation.pm line 28.
Attempt to call undefined import method with arguments ("CheckReserves" ...)
via package "C4::Reserves" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/Circulation.pm line 30.
Attempt to call undefined import method with arguments ("barcodedecode") via
package "C4::Circulation" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/Items.pm line 49.
Attempt to call undefined import method with arguments
("getitemtypeimagelocation") via package "C4::Koha" (Perhaps you forgot to load
the package?) at /kohadevbox/koha/Koha/ItemType.pm line 20.
Attempt to call undefined import method with arguments ("GetPreparedLetter"
...) via package "C4::Letters" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/Message.pm line 24.
Attempt to call undefined import method with arguments ("UpdateStats") via
package "C4::Stats" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Account.pm line 28.
Attempt to call undefined import method with arguments ("GetFine") via package
"C4::Overdues" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Account.pm line 29.
Attempt to call undefined import method with arguments ("checkpw_hash") via
package "C4::Auth" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Patron.pm line 30.
Attempt to call undefined import method with arguments ("GetPreparedLetter"
...) via package "C4::Letters" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Patron.pm line 32.
Attempt to call undefined import method with arguments ("AddReturn") via
package "C4::Circulation" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Checkouts.pm line 23.
Attempt to call undefined import method with arguments ("AddRenewal" ...) via
package "C4::Circulation" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Checkout.pm line 26.
Attempt to call undefined import method with arguments ("CanBookBeIssued" ...)
via package "C4::Circulation" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/CurbsidePickup.pm line 26.
Attempt to call undefined import method with arguments
("GetMessagingPreferences") via package "C4::Members::Messaging" (Perhaps you
forgot to load the package?) at /kohadevbox/koha/Koha/CurbsidePickup.pm line
27.
Attempt to call undefined import method with arguments ("GetPreparedLetter"
...) via package "C4::Letters" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/CurbsidePickup.pm line 28.
Attempt to call undefined import method with arguments ("barcodedecode" ...)
via package "C4::Circulation" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Item.pm line 29.
Attempt to call undefined import method with arguments ("GetBranchItemRule")
via package "C4::Circulation" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/HoldsQueue.pm line 26.
Attempt to call undefined import method with arguments ("UpdateStats") via
package "C4::Stats" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Recalls.pm line 28.
Attempt to call undefined import method with arguments ("GetPreparedLetter"
...) via package "C4::Letters" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/Hold.pm line 26.
Attempt to call undefined import method with arguments ("GetAuthorisedValues")
via package "C4::Koha" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/ILL/Request/Logger.pm line 23.
Attempt to call undefined import method with arguments ("CanBookBeIssued" ...)
via package "C4::Circulation" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/Koha/ILL/Request.pm line 49.
Attempt to call undefined import method with arguments ("GetPreparedLetter")
via package "C4::Letters" (Perhaps you forgot to load the package?) at
/kohadevbox/koha/C4/Members.pm line 29.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to