ports/devel/p5-Perl-Metrics-Simple/files/patch-File.pm
Jun Kuriyama 0a16c047b0 Perl::Metrics::Simple provides just enough methods to run static
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/
2011-12-31 08:42:18 +00:00

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;