Example 6
my $count = 0;
...
sub g {
my ($f) = @_;
dependent $f => sub {
my $old_count = $count;
return sub { $count > $old_count };
};
...
}
| Contracts in Perl | 'Class::Agreement' | #40 |
my $count = 0;
...
sub g {
my ($f) = @_;
dependent $f => sub {
my $old_count = $count;
return sub { $count > $old_count };
};
...
}
| Copyright © 2005 Ian Langworth |