Apocalypse > Test-Apocalypse-0.03 > Test::Apocalypse

Download:
Test-Apocalypse-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View Bugs
Report a bug
Module Version: 0.03   Source  

NAME ^

Test::Apocalypse - Apocalypse's favorite tests bundled into a simple interface

SYNOPSIS ^

        #!/usr/bin/perl
        use strict; use warnings;

        use Test::More;
        eval "use Test::Apocalypse";
        if ( $@ ) {
                plan skip_all => 'Test::Apocalypse required for validating the distribution';
        } else {
                # lousy hack for kwalitee
                require Test::NoWarnings; require Test::Pod; require Test::Pod::Coverage;
                is_apocalypse_here();
        }

ABSTRACT ^

Using this test module simplifies/bundles common distribution tests favored by the CPAN id APOCAL.

DESCRIPTION ^

This module greatly simplifies common author tests for modules heading towards CPAN. I was sick of copy/pasting the tons of t/foo.t scripts + managing them in every distro. I thought it would be nice to bundle all of it into one module and toss it on CPAN :) That way, every time I update this module all of my dists would be magically updated!

This module respects the TEST_AUTHOR env variable, if it is not set it will skip the entire testsuite. Normally end-users should not run it; but you can if you want to see how bad my dists are, ha!

This module uses Module::Pluggable to have custom "backends" that process various tests. We wrap them in a hackish Test::Block block per-plugin and it seems to work nicely. If you want to write your own, it should be a breeze once you look at some of my plugins and see how it works. ( more documentation to come )

Usage

In order to use this, you would need to be familiar with the "standard" steps in order to fully exercise the testsuite. There are a few steps we require, because our plugins need stuff to be prepared for them. For starters, you would need a test file in your distribution similar to the one in SYNOPSIS. Once that is done and added to your MANIFEST and etc, you can do this:

        perl Build.PL                   # sets up the dist ( duh, hah )
        ./Build dist                    # makes the tarball ( so certain plugins can process it )
        TEST_AUTHOR=1 ./Build test      # runs the testsuite!

EXPORT ^

Automatically exports the "is_apocalypse_here" sub.

MORE IDEAS ^

SEE ALSO ^

None.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Test::Apocalypse

Websites

Bugs

Please report any bugs or feature requests to bug-test-apocalypse at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Apocalypse. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

AUTHOR ^

Apocalypse <apocal@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright 2009 by Apocalypse

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.