Contracts in Perl 'Class::Agreement' #27

Example 2

use List::MoreUtils qw(all);

sub bar {
    my ( $self, $value ) = @_;
    ...
    return @things;
}
postcondition => 
    sub { all { $_ > 0 } result };
Copyright © 2005 Ian Langworth