Types
- Constraints on data structures
sub enqueue {
my ($self, @items) = @_;
for (@items) {
die "need hash"
if ref ne 'HASH';
}
...
}
| Contracts in Perl | 'Class::Agreement' | #6 |
sub enqueue {
my ($self, @items) = @_;
for (@items) {
die "need hash"
if ref ne 'HASH';
}
...
}
| Copyright © 2005 Ian Langworth |