Dependent Contacts
- Create a precondition that returns a function to run as the postcondition
method 'decrement';
dep {
my $old_item = self->item;
return sub {
self->item == $old_item - 1;
};
};
| Contracts in Perl | 'Class::Agreement' | #21 |
method 'decrement';
dep {
my $old_item = self->item;
return sub {
self->item == $old_item - 1;
};
};
| Copyright © 2005 Ian Langworth |