Exception::Assertion man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Exception::Assertion(3User Contributed Perl DocumentatiException::Assertion(3)

NAME
       Exception::Assertion - Thrown when assertion failed

SYNOPSIS
	 use Exception::Assertion;

	 sub assert_foo {
	     my $self = eval { $_[0]->isa(__PACKAGE__) } ? shift : __PACKAGE__;
	     my ($condition, $message) = @_;
	     Exception::Assertion->throw(
		 message => $message,
		 reason	 => 'foo failed',
	     ) unless $condition;
	 }

	 assert_foo( 0, 'assert_foo failed' );

DESCRIPTION
       This class extends standard Exception::Base and is thrown when
       assertion is failed.  It contains additional attribute "reason" which
       represents detailed message about reason of failed assertion.  The
       exception has also raised verbosity.

INHERITANCE
       ยท extends Exception::Base

CONSTANTS
       ATTRS : HashRef
	   Declaration of class attributes as reference to hash.

	   See Exception::Base for details.

ATTRIBUTES
       This class provides new attributes.  See Exception::Base for other
       descriptions.

       reason : Str
	   Contains the additional message filled by assertion method.

       message : Str = "Unknown assertion failed"
	   Contains the message of the exception.  This class overrides the
	   default value from Exception::Base class.

       verbosity : Int = 3
	   The default verbosity for assertion exception is raised to 3.  This
	   class overrides the default value from Exception::Base class.

       string_attributes : ArrayRef[Str] = ["message", "reason"]
	   Meta-attribute contains the format of string representation of
	   exception object.  This class overrides the default value from
	   Exception::Base class.

SEE ALSO
       Exception::Base, Test::Assertion.

AUTHOR
       Piotr Roszatycki <dexter@cpan.org>

COPYRIGHT
       Copyright (C) 2008, 2009 by Piotr Roszatycki <dexter@cpan.org>.	This
       program is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

       See <http://www.perl.com/perl/misc/Artistic.html>

perl v5.14.2			  2012-03-09	       Exception::Assertion(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net