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


Acme-PETEK-Testkit documentation  | view source Contained in the Acme-PETEK-Testkit distribution.

Index


NAME

Top

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

VERSION

Top

Version 1.00

SYNOPSIS

Top

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

Top

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

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

OBJECT METHODS

Top

$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

Top

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

Top

Pete Krawczyk, <petek@cpan.org>

BUGS

Top

Fix 'em yourself! :-)

ALSO SEE

Top

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

COPYRIGHT & LICENSE

Top


Acme-PETEK-Testkit documentation  | view source Contained in the Acme-PETEK-Testkit distribution.