Help for this page

Select Code to Download


  1. or download this
    sub lives_and (&$) {
        my ($test, $name) = @_;
    ...
        };
        return;
    }
    
  2. or download this
    lives_and { is 42, 42 } 'answer is 42';
    lives_and { is 24, 42 } 'answer is 42';
    lives_and { is sub { die 'oops' }->(), 42 } 'answer is 42';
    
  3. or download this
    ok 1 - answer is 42                                                   
    +          
    not ok 2 - answer is 42                                               
    +          
    ...
    not ok 3 - answer is 42                                               
    +          
    #     Failed test (foo.pl at line 31)                                 
    +          
    # Died: oops at foo.pl line 31.