# protected add to set credit sub setCreditAmount { my $closure = shift; my $amount = shift; caller(0)->isa(__PACKAGE__) || confess "setCreditAmount is protected"; &{$closure}( "CREDITAMOUNT", $amount ); }