nomoney: limit scope for variable

This commit is contained in:
Juerd Waalboer 2024-11-17 03:37:37 +01:00
parent 988a161016
commit bfb2d712e7

View file

@ -18,8 +18,6 @@ sub _derive_plugin($symbol) {
return;
}
my %unresolved; # to keep state, keyed per real cart
sub _inform($unresolved, $username, $skip_print = 0) {
call_hooks("beep");
@ -45,6 +43,8 @@ sub _inform($unresolved, $username, $skip_print = 0) {
}
}
my %unresolved; # to share state between hooks, keyed per real cart
sub hook_checkout_prepare($class, $cart, $username, $transaction_id, @) {
my $unresolved = $unresolved{$cart} = RevBank::Cart->new;