- or download this
my @tests = \( &T::test0, &T::test1, . . . );
- or download this
$test->($t); # Sending the $t object as the first arg...
- or download this
. . . unless eval "\$t->$test()";
- or download this
sub create_closure {
my $t = shift;
my $m = shift;
my $r = eval 'sub { $t->' . $m . '() }';
}
- or download this
my @execute{@tests} = map { create_closure( $t, $_ ) } @tests;
- or download this
foreach my $test (@tests){
if($mask & $byte{$test}){
...
#if the test returned false we unset the bit
}
}