NAME

Perl::Critic::Statistics - Compile stats on Perl::Critic violations

DESCRIPTION

This class accumulates statistics on Perl::Critic violations across one or more files. NOTE: This class is experimental and subject to change.

METHODS

new()

Create a new instance of Perl::Critic::Statistics. No arguments are supported at this time.

accumulate( $doc, \@violations )

Accumulates statistics about the $doc and the @violations that were found.

modules()

The number of chunks of code (usually files) that have been analyzed.

subs()

The total number of subroutines analyzed by this Critic.

statements()

The total number of statements analyzed by this Critic.

lines_of_code()

The total number of lines of code analyzed by this Critic.

violations_by_severity()

The number of violations of each severity found by this Critic as a reference to a hash keyed by severity.

violations_by_policy()

The number of violations of each policy found by this Critic as a reference to a hash keyed by full policy name.

total_violations()

The the total number of violations found by this Critic.

average_sub_mccabe()

The average McCabe score of all scanned subroutines.

violations_per_line_of_code()

The total violations divided by the lines of code.

AUTHOR

Elliot Shank <perl@galumph.com>

COPYRIGHT

Copyright (c) 2007 Elliot Shank

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.