Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    my ($x, $y) = My::Module->pairs();
    
    print "ok" if $x == $y;
    
  2. or download this
    use warnings;
    use strict;
    ...
    is ($x, $y, "pairs() returns a pair that match");
    
    done_testing();
    
  3. or download this
    ok 1 - use My::Module;
    not ok 2 - pairs() returns a pair that match
    ...
    #     expected: '2'
    1..2
    # Looks like you failed 1 test of 2.
    
  4. or download this
    sub pairs {
        return (1, 2);
    }