Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    for my $method (qw/method1 method2/) {
        subtest "Checking $method" => sub { my_subtest(MyPackage->$method)
    + };
    }
    
  2. or download this
    sub new_test {
        my ($test, $method) = @_;
    ...
    for my $method (qw/method1 method2/) {
        subtest "Checking $method", new_test(\&my_subtest, $method);
    }
    
  3. or download this
    Type of arg 2 to Test::More::subtest must be sub {} (not subroutine en
    +try)