NAME

Acme::PETEK::Testkit - Perl module codebase for Tester's Toolkit

VERSION

Version 1.00

SYNOPSIS

This Perl module is intended to be a collection of sample code for the Tester's Toolkit presentation at YAPC::NA 2005 by the author.

use Acme::PETEK::Testkit;
my $c = Acme::PETEK::Testkit->new;
$c->incr;

CONSTRUCTOR

$kit = Acme::PETEK::Testkit->new()

Creates a new Acme::PETEK::Testkit object, which will be used for the object interface below.

OBJECT METHODS

$kit->reset( $int );

Resets the value of the stored counter, optionally setting it to $int.

$kit->incr( $int );

Increment the counter by 1. If $int is provided, increment by that. Returns the current value of the counter.

$kit->decr( $int );

Decrement the counter by 1. If $int is provided, decrement by that. Returns the current value of the counter.

$kit->value;

Returns the current value of the counter.

$kit->sign

Returns "positive" or "negative" based on the value of the counter.

CLASS METHODS

add($int, $int)

Adds the two integers together and returns the result.

subtract($int, $int)

Subtracts the second integer from the first and returns the result.

AUTHOR

Pete Krawczyk, <petek@cpan.org>

BUGS

Fix 'em yourself! :-)

ALSO SEE

Slides from the presentation are available at http://www.bsod.net/~petek/slides/.

COPYRIGHT & LICENSE

Copyright 2005 Pete Krawczyk, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This library has also been released under a Creative Commons license at the request of the YAPC::NA 2005 organizers. See http://creativecommons.org/licenses/by/2.0/ca/ for more information; in short, please give credit to the author should you use this code elsewhere.