Bug 36792 - Limit POSIX imports
Summary: Limit POSIX imports
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Janusz Kaczmarek
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 36552
Blocks:
  Show dependency treegraph
 
Reported: 2024-05-06 12:03 UTC by Janusz Kaczmarek
Modified: 2024-05-31 15:58 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06,23.05.12


Attachments
Bug 36792: Limit POSIX imports (1.75 KB, patch)
2024-05-06 12:13 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 36792: Limit POSIX imports (1.85 KB, patch)
2024-05-06 12:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2024-05-06 12:03:28 UTC
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.
Comment 1 Marcel de Rooy 2024-05-06 12:09:34 UTC
Good catch. So we must add qw()
Comment 2 Marcel de Rooy 2024-05-06 12:10:02 UTC
Are you submitting the fix?
Comment 3 Janusz Kaczmarek 2024-05-06 12:13:06 UTC
Created attachment 166216 [details] [review]
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.
Comment 4 Marcel de Rooy 2024-05-06 12:17:42 UTC
Created attachment 166217 [details] [review]
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 <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2024-05-06 12:18:19 UTC
Trivial patch, directly in PQA

Thanks Janusz
Comment 6 Katrin Fischer 2024-05-06 13:05:07 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2024-05-24 14:07:40 UTC
Not backported to 23.11.x
Comment 8 Janusz Kaczmarek 2024-05-28 22:31:20 UTC
(In reply to Fridolin Somers from comment #7)
> Not backported to 23.11.x

Hi Fridolin, please, take into account that if you have taken Bug 36552 for 23.11 you should most probably take also this one...
Comment 9 Fridolin Somers 2024-05-29 15:52:46 UTC
(In reply to Janusz Kaczmarek from comment #8)
> (In reply to Fridolin Somers from comment #7)
> > Not backported to 23.11.x
> 
> Hi Fridolin, please, take into account that if you have taken Bug 36552 for
> 23.11 you should most probably take also this one...

Oh indeed, thanks for the alert
Comment 10 Fridolin Somers 2024-05-30 08:02:55 UTC
Pushed to 23.11.x for 23.11.06
Comment 11 Lucas Gass 2024-05-31 15:29:28 UTC
Enhancement will not be backported to 23.05.x
Comment 12 Janusz Kaczmarek 2024-05-31 15:53:10 UTC
(In reply to Lucas Gass from comment #11)
> Enhancement will not be backported to 23.05.x

Hi Lucas, please, take into account that if you have taken Bug 36552 for 23.05 you should most probably take also this one...
Comment 13 Lucas Gass 2024-05-31 15:57:04 UTC
(In reply to Janusz Kaczmarek from comment #12)
> (In reply to Lucas Gass from comment #11)
> > Enhancement will not be backported to 23.05.x
> 
> Hi Lucas, please, take into account that if you have taken Bug 36552 for
> 23.05 you should most probably take also this one...

Thanks Janusz, I will backport it.
Comment 14 Lucas Gass 2024-05-31 15:58:16 UTC
Backported to 23.05.x for upcoming 23.05.12