mirror of
https://git.freebsd.org/ports.git
synced 2025-05-30 01:46:55 -04:00
analysis of one or many Perl files and obtain a few metrics: packages, subroutines, lines of code, and an approximation of cyclomatic (mccabe) complexity for the subroutines and the "main" portion of the code. Perl::Metrics::Simple is far simpler than Perl::Metrics. Installs a script called countperl. WWW: http://search.cpan.org/dist/Perl-Metrics-Simple/
12 lines
521 B
Perl
12 lines
521 B
Perl
Obtained from http://perl-users.jp/articles/advent-calendar/2011/test/11
|
|
|
|
--- ./lib/Perl/Metrics/Simple/Analysis/File.pm.orig 2011-12-31 17:19:26.800034766 +0900
|
|
+++ ./lib/Perl/Metrics/Simple/Analysis/File.pm 2011-12-31 17:20:16.967169838 +0900
|
|
@@ -327,6 +327,7 @@
|
|
name => $sub->name,
|
|
lines => $sub_length,
|
|
mccabe_complexity => $self->measure_complexity($sub),
|
|
+ line_number => $sub->line_number,
|
|
};
|
|
}
|
|
return \@subs;
|