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