Test::Perl::Metrics::Lite - Use Perl::Metrics::Lite in test programs
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:
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.