Test::Perl::Metrics::Lite - Use Perl::Metrics::Lite in test programs
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();
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.
This source is in Github:
http://github.com/dann/p5-test-perl-metrics-lite
Dann <techmemo@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Test::Perl::Metrics::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Perl::Metrics::Lite
CPAN shell
perl -MCPAN -e shell install Test::Perl::Metrics::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.