NAME

Module::CPANTS::Reporter - Base class for CPANTS reporters

SYNOPSIS

This is only a base class providing an interface for subclasses to override.

Do not use this Class directly.

DESCRIPTION

Subclasses of Module::CPANTS::Reporter should implement these methods, all of which are class methods:

init

Module::CPANTS::Reporter::Subclass->init($cpants);

Take a Module::CPANTS::Generator object as only argument. init is called only once when Module::CPANTS::Generator loads all reporter modules in load_reporter.

You can use init to initialise your reporter (e.g. set up a DB connection, populate package globals, etc)

If your subclass doesn't need initialization, simply provide an empty sub

sub init { }

report

Module::CPANTS::Reporter::Subclass->report($metric);

report is called via $metric->report, which calls report on each registered reporter module.

report is the core of each reporter module. Obviously, it reports data somehow. CPANTS data is available via the Module::CPANTS::Metrics object passed in as an parameter, especially it's data method.

finish

Module::CPANTS::Reporter::Subclass->finish($metric);

finish takes no arguments and is called after running all tests for each registered reporter module on all packages.

Use finish to do some cleanup, or to report some data that's only available after the whole CPANTS run.

SEE ALSO

Take a look at those modules for some ideas on reporters:

And don't forget:

Module::CPANTS::Generator

Module::CPANTS::Metrics

AUTHOR

Thomas Klausner <domm@zsi.at> http://domm.zsi.at

COPYRIGHT

Module::CPANTS::Metrics is Copyright (c) 2003 Thomas Klausner, ZSI. All rights reserved.

You may use and distribute this module according to the same terms that Perl is distributed under.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 101:

You forgot a '=back' before '=head2'