in reply to Re: An example of programming by contract
in thread An example of programming by contract

Good try, but:
die "Gotcha!" if validate_integer("not an integer");
Personally I either wouldn't have the test, or else I would make the test be an RE pattern. eg:
sub is_integer { $_[0] =~ /^-?\d+\z/; }