]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1781480: Closures remeber values in subtle ways...
authorMike Rylander <mrylander@gmail.com>
Mon, 17 Sep 2018 15:33:29 +0000 (11:33 -0400)
committerJason Stephenson <jason@sigio.com>
Fri, 21 Sep 2018 14:26:06 +0000 (10:26 -0400)
commitd363b8eefae87fb90b803d1b42eb9d061557cf2f
tree7a68c8db07be27dfe0df4b881dd50ecb1653fcc8
parentfc105fc32494a73c872c0b2e8a9362e2fc2d9f33
LP#1781480: Closures remeber values in subtle ways...

... and we must take care to avoid that.  This commit forces a state variable
to be statically assigned an empty list rather than depending on the idiomatic
undef to vivicate an empty list.  This is important for all OpenSRF methods,
and manifests here as a search "remembering" a previously chosen location
group.  A comment to that point is included for our future selves.

The core probably arises from the fact that, in the end, OpenSRF methods are
generated closures.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Jeanette Lundgren <jlundgren@cwmars.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm