Perl::Metrics::Plugin::Core - The Core Perl Metrics Package


Perl-Metrics documentation  | view source Contained in the Perl-Metrics distribution.

Index


NAME

Top

Perl::Metrics::Plugin::Core - The Core Perl Metrics Package

DESCRIPTION

Top

This class provides a set of core metrics for Perl documents, based on very simple code using only the core PPI package.

METRICS

Top

As with all Perl::Metrics::Plugin packages, all metrics can be referenced with the global identifier Perl::Metrics::Plugin::Core::metric.

Metrics are listed as "datatype name".

integer tokens

The tokens metric represents the total number of PPI::Token objects contained in the document.

For example, the following one-line document would have a tokens metric of 5 (assuming a single trailing newline)

  print "Hello World!\n";

integer significant_tokens

The significant_tokens metric represents the total number of significant tokens contained in the document.

This filters out things like whitespace and comments, and refers (more or less) to only the parts of the document that actually do something.

For more information on significance, see significant in PPI::Element.

SUPPORT

Top

Bugs should be reported via the CPAN bug tracker at

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Metrics

For other issues, contact the author.

AUTHOR

Top

Adam Kennedy <adamk@cpan.org>

SEE ALSO

Top

Perl::Metrics::Plugin, Perl::Metrics, PPI

COPYRIGHT

Top


Perl-Metrics documentation  | view source Contained in the Perl-Metrics distribution.