WWW::Postini::Assert - Simple testing, with exception throwing


WWW-Postini documentation  | view source Contained in the WWW-Postini distribution.

Index


NAME

Top

WWW::Postini::Assert - Simple testing, with exception throwing

SYNOPSIS

Top

  use WWW::Postini::Assert;

  assert(1 == 1, 'One equals one'); # pass
  assert(2 == 1, 'Two equals one'); # fail

DESCRIPTION

Top

The purpose of this module is to provide a very simple testing mechanism with the ability to throw exception objects on failure.

EXPORTS

Top

The function assert() is automatically exported into the current namespace.

FUNCTIONS

Top

assert($value)
assert($value,$description)

Tests for a defined non-zero $value parameter and throws an exception of class WWW::Postini::Exception::AssertionFailure on failure. If $description is provided, it is added to the resulting exception description.

SEE ALSO

Top

WWW::Postini, WWW::Postini::Exception::AssertionFailure

AUTHOR

Top

Peter Guzis, <pguzis@cpan.org>

COPYRIGHT AND LICENSE

Top


WWW-Postini documentation  | view source Contained in the WWW-Postini distribution.