Skip to content

Instantly share code, notes, and snippets.

@ktvoelker
Created August 1, 2010 17:57
Show Gist options
  • Save ktvoelker/503578 to your computer and use it in GitHub Desktop.
Save ktvoelker/503578 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use lib './';
use Contract;
use Contract::Predicate;
sub foo {
my ($x, $y) = @_;
my $z = $x + $y;
return "$x + $y == $z";
}
contract "foo", two_of integer, integer;
my $x = foo 3, 4;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment