I'm not sure why we didn't do it already, but running Koha in a persistent context has become the standard.

This means variables defined as `our $variable` will persist in memory while workers run. And this is dangerous for several reasons. The most obvious one is that sometimes the code expects the caller to pass a parameter and checks if it is defined, and using `our` might make it defined when it shouldn't.

If the reason to use it is caching, then it is a bad pattern anyway. We should be using the in-memory cache (lite) explicitly so everyone knows the value is expected to be fetched from a cache.

Looking forward to hear your thoughts

PS interestingly, I found this while finding the root cause for some files not being tidied :-P
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39152

--
Tomás Cohen Arazi
Theke Solutions (https://theke.io)
✆ +54 9351 3513384
GPG: B2F3C15F