package Recall;
sub recall {
$_[0]->(@_);
}
sub recallable_sub(&) {
my $coderef = shift;
my $obj = bless($coderef);
sub { $obj->recall(@_) };
}
recallable_sub {
my $recall = shift;
my $c = shift;
print "$c \n";
$recall->recall($c) if ($c --);
}->(10);