From 8d9ccd6fc371877fbd4d016ee3bc1de54721787e Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Mon, 6 May 2024 12:06:22 +0000 Subject: [PATCH] Bug 36792: Limit POSIX imports A Marcel's QA patch to Bug 36552 added use POSIX; in two spots. In https://metacpan.org/pod/POSIX we read: CAVEATS Everything is exported by default (with a handful of exceptions). This is an unfortunate backwards compatibility feature and its use is strongly discouraged. You should either prevent the exporting (by saying use POSIX ();, as usual) and then use fully qualified names (e.g. POSIX::SEEK_END), or give an explicit import list. If you do neither and opt for the default (as in use POSIX;), you will import hundreds and hundreds of symbols into your namespace. This patch fixes this. No test plan. Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- authorities/authorities.pl | 2 +- cataloguing/addbiblio.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 462098bc1e..e5150f7015 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -21,7 +21,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use POSIX; +use POSIX qw( strftime ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::AuthoritiesMarc qw( AddAuthority ModAuthority GetAuthority GetTagsLabels GetAuthMARCFromKohaField FindDuplicateAuthority ); diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index d81215d486..3d92cdad1f 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -21,7 +21,7 @@ use Modern::Perl; use CGI; -use POSIX; +use POSIX qw( strftime ); use Try::Tiny qw(catch try); use C4::Output qw( output_html_with_http_headers ); -- 2.39.5