- or download this
sub new {
my $class = shift;
...
bless( $closure, $class );
return $closure;
}
- or download this
# public to add accounts to the creditaccounts
sub addCreditAccount {
...
my $accountsref = &{$closure}( "CREDITACCOUNTS" );
push @{ $accountsref }, $account;
}
- or download this
# public getBalansCreditAmount to get the amount of all accounts
sub getBalansCreditAmount {
...
}
return $totalCreditAmount;
}
- or download this
# private getCreditAccounts
sub getCreditAccounts {
...
my @accounts = @{ &{$closure}( "CREDITACCOUNTS" ) };
return @accounts;
}