Acme-Sort-Sleep
view release on metacpan or search on metacpan
local/lib/perl5/Test/Exception.pm view on Meta::CPAN
=back
=head1 SKIPPING TEST::EXCEPTION TESTS
Sometimes we want to use Test::Exception tests in a test suite, but don't want to force the user to have Test::Exception installed. One way to do this is to skip the tests if Test::Exception is absent. You can do this with code something like this:
use strict;
use warnings;
use Test::More;
BEGIN {
eval "use Test::Exception";
plan skip_all => "Test::Exception needed" if $@;
}
plan tests => 2;
# ... tests that need Test::Exception ...
Note that we load Test::Exception in a C<BEGIN> block ensuring that the subroutine prototypes are in place before the rest of the test script is compiled.
=head1 BUGS
There are some edge cases in Perl's exception handling where Test::Exception will miss exceptions
thrown in DESTROY blocks. See the RT bug L<http://rt.cpan.org/Ticket/Display.html?id=24678> for
details, along with the t/edge-cases.t in the distribution test suite. These will be addressed in
a future Test::Exception release.
If you find any more bugs please let me know by e-mail, or report the problem with
L<http://rt.cpan.org/>.
=head1 COMMUNITY
=over 4
=item perl-qa
If you are interested in testing using Perl I recommend you visit L<http://qa.perl.org/> and join the excellent perl-qa mailing list. See L<http://lists.perl.org/showlist.cgi?name=perl-qa> for details on how to subscribe.
=item perlmonks
You can find users of Test::Exception, including the module author, on L<http://www.perlmonks.org/>. Feel free to ask questions on Test::Exception there.
=item CPAN::Forum
The CPAN Forum is a web forum for discussing Perl's CPAN modules. The Test::Exception forum can be found at L<http://www.cpanforum.com/dist/Test-Exception>.
=item AnnoCPAN
AnnoCPAN is a web site that allows community annotations of Perl module documentation. The Test::Exception annotations can be found at L<http://annocpan.org/~ADIE/Test-Exception/>.
=back
=head1 TO DO
If you think this module should do something that it doesn't (or does something that it shouldn't) please let me know.
You can see my current to do list at L<http://adrianh.tadalist.com/lists/public/15421>, with an RSS feed of changes at L<http://adrianh.tadalist.com/lists/feed_public/15421>.
=head1 ACKNOWLEDGMENTS
Thanks to chromatic and Michael G Schwern for the excellent Test::Builder, without which this module wouldn't be possible.
Thanks to
Adam Kennedy,
Andy Lester,
Aristotle Pagaltzis,
Ben Prew,
Cees Hek,
Chris Dolan,
chromatic,
Curt Sampson,
David Cantrell,
David Golden,
David Tulloh,
David Wheeler,
J. K. O'Brien,
Janek Schleicher,
Jim Keenan,
Jos I. Boumans,
Joshua ben Jore,
Jost Krieger,
Mark Fowler,
Michael G Schwern,
Nadim Khemir,
Paul McCann,
Perrin Harkins,
Peter Rabbitson,
Peter Scott,
Ricardo Signes,
Rob Muhlestein,
Scott R. Godin,
Steve Purkis,
Steve,
Tim Bunce,
and various anonymous folk for comments, suggestions, bug reports and patches.
=head1 AUTHOR
Adrian Howard <adrianh@quietstars.com>
If you can spare the time, please drop me a line if you find this module useful.
=head1 SEE ALSO
=over 4
=item L<http://del.icio.us/tag/Test::Exception>
Delicious links on Test::Exception.
=item L<Test::Fatal>
A slightly different interface to testing exceptions, without overriding C<CORE::caller>.
=item L<Test::Warnings> & L<Test::Warn> & L<Test::NoWarnings>
( run in 0.535 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )