Contracts in Perl 'Class::Agreement' #6

Types

sub enqueue {
    my ($self, @items) = @_;
    for (@items) {
        die "need hash"
            if ref ne 'HASH';
    }
    ...
}
Copyright © 2005 Ian Langworth