paperlined.org
dev
>
perl
>
modules
>
related_modules
>
static_analysis
document updated 2 years ago, on Jul 28, 2022
Ways to count the number of source lines of code (SLOC) of a piece of Perl code:
Perl::Metrics::Simple::Analysis::File
— uses
PPI
to ignore any blank lines, POD lines, or comment-only lines
Its
lines()
method is the first one you might try, though that module provides several different ways to provide SLOC metrics.