Assert-Refute
view release on metacpan or search on metacpan
lib/Assert/Refute.pm view on Meta::CPAN
Otherwise it is assumed to pass.
The BLOCK must accept one argument, the contract execution report,
likely a L<Assert::Refute::Report> instance.
More arguments MAY be added in the future.
Return value is ignored.
A read-only report instance is returned by C<try_refute> instead.
If C<on_pass>/C<on_fail> callbacks were specified during C<use> or
using C<configure>, they will also be executed if appropriate.
If C<NDEBUG> or C<PERL_NDEBUG> environment variable is set at compile time,
this block is replaced with a stub
which returns an unconditionally passing report.
This is basically what one expects from a module in C<Assert::*> namespace.
=head2 refute_these
lib/Assert/Refute.pm view on Meta::CPAN
as contract report.
=item * skip_all - reason for skipping ALL C<try_refute> blocks
in the affected package.
This defaults to C<PERL_NDEBUG> or C<NDEBUG> environment variable.
B<[EXPERIMENTAL]>. Name and meaning MAY change in the future.
=back
The callbacks MUST be either
a C<CODEREF> accepting L<Assert::Refute::Report> object,
or one of predefined strings:
=over
=item * skip - do nothing;
=item * carp - warn the stringified report;
=item * croak - die with stringified report as error message;
( run in 0.436 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )