Main > Programming > Libraries >

Class::Agreement 0.02

Class::Agreement 0.02

Sponsored Links

Class::Agreement 0.02 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.027 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 968
Date added: 2007-02-28
Publisher: Ian Langworth

Class::Agreement 0.02 description

Class::Agreement is a Perl module that add contracts to your Perl classes easily.

SYNOPSIS

package SomeClass;

use Class::Agreement;

# use base Class::Accessor or Class::MethodMaker,
# or roll your own:
sub new { ... }

invariant {
my ($self) = @_;
$self->count > 0;
};

precondition add_a_positive => sub {
my ( $self, $value ) = @_;
return ( $value >= 0 );
};
sub add_a_positive {
my ( $self, $value ) = @_;
...
}

sub choose_word {
my ( $self, $value ) = @_;
...
}
postcondition choose_word => sub {
return ( result >= 0 );
};

dependent increase_foo => sub {
my ( $self, $amount ) = @_;
my $old_foo = $self->foo;
return sub {
my ( $self, $amount ) = @_;
return ( $old_foo < $self->get_foo );
}
};
sub increase_foo {
my ( $self, $amount ) = @_;
$self->set_foo( $self->get_foo + $amount );
}

Class::Agreement is an implementation of behavioral contracts for Perl5. This module allows you to easily add pre- and postconditions to new or existing Perl classes.
This module provides contracts such as dependent contracts, contracts for higher-order functions, and informative messages when things fail.

At the time of this writing, Class::Agreement is one of only two contract implementations that blames contract-breaking components correctly. (See: "Object-oriented Programming Languages Need Well-founded Contracts" at http://citeseer.ist.psu.edu/findler01objectoriented.html.)
Using Class::Agreement lets you specify proper input and output of your functions or methods, thus strengthening your code and allowing you to spot bugs earlier.

Class::Agreement 0.02 Screenshot

Advertisements

Class::Agreement 0.02 Keywords

Bookmark Class::Agreement 0.02

Hyperlink code:
Link for forum:

Class::Agreement 0.02 Copyright

WareSeeker periodically updates pricing and software information of Class::Agreement 0.02 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Class::Agreement 0.02 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Class::Simple is a simple Object-Oriented Base Class. Free Download
Class::Maker Perl module contains classes, reflection, schema, serialization, attribute- and multiple inheritance. Free Download
Class::ObjectTemplate is a Perl extension for an optimized template builder base class. Free Download
Sub::Regex is a Perl module to create synonymous subroutines. Free Download
Test::Usage is a different approach to testing: selective, quieter, colorful. Free Download
POE::Component::Basement provides Class::Std and base POE component functionality. Free Download
ModPerl::PackageRegistry is a Perl module to map URIs to perl package namespaces. Free Download
Class::HPLOO is an easier way to declare classes on Perl, based in the popular class {...} style and ePod. Free Download