Help for this page

Select Code to Download


  1. or download this
    sub foo {
      my ($foo,$bar,@baz) = @_;
    
  2. or download this
    public void set_foo(int bar) { ... }
    
    public void set_foo(int bar, int length) { ... }
    
  3. or download this
    sub foo {
      my ($bar,$baz,$quux) = @_;
    ...
      # now test $quux
      # do our stuff
    }
    
  4. or download this
    +-----+      +-----+      +-----+      +-----+      +-----+
    |     |  AB  |     |  BC  |     |  CD  |     |  DE  |     |
    |  A  |----->|  B  |----->|  C  |----->|  D  |----->|  E  |
    |     |      |     |      |     |      |     |      |     |
    +-----+      +-----+      +-----+      +-----+      +-----+
    
  5. or download this
    sub assign_contract {
        my ($function_name, %contract) = @_;
    ...
        }
        return @results;
    }
    
  6. or download this
      use Test::More tests => 32;
      use Test::Contract 'contract_file';
    
  7. or download this
      package Foo::Bar;
      use Contract::File 'Foo::Bar::Contract'; # I don't quite like this