From 822d7f43ab7437ce6f82108260f73e165db4b374 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 (cherry picked from commit 8d9ccd6fc371877fbd4d016ee3bc1de54721787e) Signed-off-by: Fridolin Somers (cherry picked from commit ca023b334cc9b79cfd85e6bb9a75c7037ae1fd95) Signed-off-by: Lucas Gass --- 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 fb964e41b7..c7859417d6 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 a776eedae4..141202c8ce 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -22,7 +22,7 @@ use Modern::Perl; use CGI; -use POSIX; +use POSIX qw( strftime ); use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user haspermission ); use C4::Biblio qw( -- 2.39.5