LP#1781480: Closures remeber values in subtle ways...
authorMike Rylander <mrylander@gmail.com>
Mon, 17 Sep 2018 15:33:29 +0000 (11:33 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 17 Sep 2018 15:33:29 +0000 (11:33 -0400)
commit54fe4ad5ccc48a4aeaee0adea832172b8934d668
tree6f88a176967d0d3cf6e7df27934cfae821f8db72
parent56aa1445c8f209d2c516cdb01969433bd05be8d1
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>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm