Bug 30731

Summary: Noise from about script coming from Test::MockTime (or other CPAN modules)
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, fridolin.somers, lucas, martin.renvoize, tomascohen, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20103
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.01, 21.11.07
Bug Depends on:    
Bug Blocks: 25515    
Attachments: Bug 30731: Unit tests
Bug 30731: Silence noisy CPAN modules in C4::Installer::PerlModules
Bug 30731: Remove Readonly::XS::MAGIC_COOKIE
Bug 30731: Unit tests
Bug 30731: Silence noisy CPAN modules in C4::Installer::PerlModules
Bug 30731: Remove Readonly::XS::MAGIC_COOKIE
Bug 30731: Unit tests
Bug 30731: Silence noisy CPAN modules in C4::Installer::PerlModules
Bug 30731: Remove Readonly::XS::MAGIC_COOKIE

Description Marcel de Rooy 2022-05-11 13:44:13 UTC
Run about. CHeck your staff log.

[2022/05/11 13:40:29] [WARN] Subroutine CORE::GLOBAL::time redefined at /usr/share/perl5/Test/MockTime.pm line 20, <DATA> line 755.
[2022/05/11 13:40:29] [WARN] Prototype mismatch: sub CORE::GLOBAL::time () vs none at /usr/share/perl5/Test/MockTime.pm line 20, <DATA> line 755.
[2022/05/11 13:40:29] [WARN] Subroutine CORE::GLOBAL::localtime redefined at /usr/share/perl5/Test/MockTime.pm line 21, <DATA> line 755.
[2022/05/11 13:40:29] [WARN] Prototype mismatch: sub CORE::GLOBAL::localtime (;$) vs none at /usr/share/perl5/Test/MockTime.pm line 21, <DATA> line 755.
[2022/05/11 13:40:29] [WARN] Subroutine CORE::GLOBAL::gmtime redefined at /usr/share/perl5/Test/MockTime.pm line 22, <DATA> line 755.
[2022/05/11 13:40:29] [WARN] Prototype mismatch: sub CORE::GLOBAL::gmtime (;$) vs none at /usr/share/perl5/Test/MockTime.pm line 22, <DATA> line 755.
Comment 1 Marcel de Rooy 2022-05-12 07:03:29 UTC
The changes from the change of PerlDependencies to cpanfile make the Readonly::XS::MAGIC_COOKIE no longer needed too.
See also bug 20103.
Comment 2 Marcel de Rooy 2022-05-12 07:11:17 UTC
Created attachment 134913 [details] [review]
Bug 30731: Unit tests

Installer_pm.t can safely be discarded, having Installer_PerlModules.t.

Note: Without the second patch, the test about versions_info being silent
might fail. With the second patch, it should pass.
Note that since the order of requiring the cpan modules varies (without
the second patch), the results (potential warnings) vary too.

Test plan:
Run t/Installer_PerlModules.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2022-05-12 07:11:21 UTC
Created attachment 134914 [details] [review]
Bug 30731: Silence noisy CPAN modules in C4::Installer::PerlModules

Main change is replacing 'no warnings' by local $SIG{__WARN__}.

The modules are sorted now too. This will make results of requiring
them one after the other a more predictable experience and improves
the output of koha_perl_deps.

Test plan:
Run about. Check plack intranet log.
Run koha_perl_deps.pl -a

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2022-05-12 07:11:24 UTC
Created attachment 134915 [details] [review]
Bug 30731: Remove Readonly::XS::MAGIC_COOKIE

This variable does not make sense anymore, since the Readonly::XS
module is not listed in the cpanfile. So it will not be required
the versions_info loop.

Test plan:
Run t/Installer_PerlModules.t again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 David Nind 2022-05-12 08:15:48 UTC
Created attachment 134917 [details] [review]
Bug 30731: Unit tests

Installer_pm.t can safely be discarded, having Installer_PerlModules.t.

Note: Without the second patch, the test about versions_info being silent
might fail. With the second patch, it should pass.
Note that since the order of requiring the cpan modules varies (without
the second patch), the results (potential warnings) vary too.

Test plan:
Run t/Installer_PerlModules.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2022-05-12 08:15:53 UTC
Created attachment 134918 [details] [review]
Bug 30731: Silence noisy CPAN modules in C4::Installer::PerlModules

Main change is replacing 'no warnings' by local $SIG{__WARN__}.

The modules are sorted now too. This will make results of requiring
them one after the other a more predictable experience and improves
the output of koha_perl_deps.

Test plan:
Run about. Check plack intranet log.
Run koha_perl_deps.pl -a

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2022-05-12 08:15:57 UTC
Created attachment 134919 [details] [review]
Bug 30731: Remove Readonly::XS::MAGIC_COOKIE

This variable does not make sense anymore, since the Readonly::XS
module is not listed in the cpanfile. So it will not be required
the versions_info loop.

Test plan:
Run t/Installer_PerlModules.t again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 Katrin Fischer 2022-05-13 09:49:00 UTC
Looking here now.
Comment 9 Katrin Fischer 2022-05-13 09:56:04 UTC
Created attachment 134960 [details] [review]
Bug 30731: Unit tests

Installer_pm.t can safely be discarded, having Installer_PerlModules.t.

Note: Without the second patch, the test about versions_info being silent
might fail. With the second patch, it should pass.
Note that since the order of requiring the cpan modules varies (without
the second patch), the results (potential warnings) vary too.

Test plan:
Run t/Installer_PerlModules.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 10 Katrin Fischer 2022-05-13 09:56:08 UTC
Created attachment 134961 [details] [review]
Bug 30731: Silence noisy CPAN modules in C4::Installer::PerlModules

Main change is replacing 'no warnings' by local $SIG{__WARN__}.

The modules are sorted now too. This will make results of requiring
them one after the other a more predictable experience and improves
the output of koha_perl_deps.

Test plan:
Run about. Check plack intranet log.
Run koha_perl_deps.pl -a

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 11 Katrin Fischer 2022-05-13 09:56:12 UTC
Created attachment 134962 [details] [review]
Bug 30731: Remove Readonly::XS::MAGIC_COOKIE

This variable does not make sense anymore, since the Readonly::XS
module is not listed in the cpanfile. So it will not be required
the versions_info loop.

Test plan:
Run t/Installer_PerlModules.t again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 12 Fridolin Somers 2022-05-16 21:10:54 UTC
I prefer not to push in this release
Comment 13 Marcel de Rooy 2022-05-17 06:25:56 UTC
(In reply to Fridolin Somers from comment #12)
> I prefer not to push in this release

21.11 => 22.11
Comment 14 Tomás Cohen Arazi 2022-06-01 19:23:22 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 15 Lucas Gass 2022-06-10 15:20:58 UTC
Pushed to 22.05.x for 22.05.01
Comment 16 Arthur Suzuki 2022-06-21 12:44:23 UTC
thx, pushed to 21.11.x for 21.11.07
Comment 17 Victor Grousset/tuxayo 2022-06-25 23:53:49 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.