Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Perl
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/Test/Perl/Metrics
t
xt
.gitignore
.shipit
.travis.yml
Build.PL
Changes
MANIFEST.SKIP
README
README.pod

README.pod

NAME

Test::Perl::Metrics::Lite - Use Perl::Metrics::Lite in test programs

SYNOPSIS

Basic usage.

  use Test::Perl::Metrics::Lite;
  all_metrics_ok();

You can change the metrics threshold.

  use Test::Perl::Metrics::Lite (-mccabe_complexity => 20, -loc => 100);
  all_metrics_ok();

Exclude some files with except_file option

  use Test::Perl::Metrics::Lite (
      -except_file => [
          'lib/SomeClass.pm',
          'lib/SomeDir/SomeClass.pm'
       ]
  );
  all_metrics_ok();

DESCRIPTION

Test::Perl::Metrics::Lite wraps the Perl::Metrics::Lite engine in a convenient subroutine suitable for test programs written using the Test::More framework

This makes it easy to integrate metrics enforcement into the build process.

Mccabe complexity theshold is 10 and the lines of code theshold is 60. all_metrics_ok() test is failed when metrics exceed threshold values relative to the baseline.

SOURCE AVAILABILITY

This source is in Github:

  http://github.com/dann/p5-test-perl-metrics-lite

AUTHOR

Dann <techmemo@gmail.com>

SEE ALSO

LICENSE

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

Something went wrong with that request. Please try again.