OnWorks favicon

countperlp - Online in the Cloud

Run countperlp in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command countperlp that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



countperl - count lines, packages, subs and complexity of Perl files.


countperl FILE_OR_DIRECTORY [FILE_OR_DIRECTORY ...] [--html] [--help]


At least one file or directory path must be supplied.


Prints documentation to STDERR.

Produces HTML output instead of the plain-text default.

A comma-separated list of method modifiers to be recognised, see
Moose::Manual::MethodModifiers for details. If unspecified, the default list is


N/A. Currently no support for any configuration files.


Exits zero on success, non-zero on failure.


countperl uses Perl::Metrics::Simple to examines the named files and recursivesly searches
named directories for Perl files.

Perl files are identified by Perl::Metrics::Simple->is_perl_file. Basically if the file
ends in ".pl", ".pm", or ".t" or has what appears to be a perl shebang line.

countperl produces a report on STDOUT of counts of total lines, packages,
subroutines/methods, the minimum, maximum, mean, standard deviation, and median size and
mccabe_complexity (cyclomatic complexity) of subroutines and the 'main' portion of each
file (everything not in a subroutine.)

Output Format
Line counts do not include comments nor pod.

The current output format is human-readable text:

Perl files found: 3

total code lines: 856
lines of non-sub code: 450
packages found: 3
subs/methods: 42

Subroutine/Method Size
min: 3 lines
max: 32 lines
mean: 9.67 lines
std. deviation: 7.03
median: 7.50

McCabe Complexity
Code not in any subroutine::
min: 1
max 1
mean: 1.00
std. deviation: 0.00
median: 1.00

min: 1
max: 5
avg: 1.00
std. deviation: 1.36
median: 1.00

Tab-delimited list of subroutines, with most complex at top
complexity sub path size
5 is_perl_file lib/Perl/Metrics/Simple.pm 11
5 _has_perl_shebang lib/Perl/Metrics/Simple.pm 13
5 _init lib/Perl/Metrics/Simple/Analysis/File.pm 30
4 find_files lib/Perl/Metrics/Simple.pm 11
4 new lib/Perl/Metrics/Simple/Analysis.pm 10
4 is_ref lib/Perl/Metrics/Simple/Analysis.pm 8

With --html switch output format is HTML.


This is version 0.031 of countperl.


Prints usage message to STDERR if required arguments are not provided.


None known.

Use countperlp online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    USBLoaderGX is a GUI for
    Waninkoko's USB Loader, based on
    libwiigui. It allows listing and
    launching Wii games, Gamecube games and
    homebrew on Wii and WiiU...
    Download USBLoaderGX
  • 2
    Firebird RDBMS offers ANSI SQL features
    & runs on Linux, Windows &
    several Unix platforms. Features
    excellent concurrency & performance
    & power...
    Download Firebird
  • 3
    KompoZer is a wysiwyg HTML editor using
    the Mozilla Composer codebase. As
    Nvu's development has been stopped
    in 2005, KompoZer fixes many bugs and
    adds a f...
    Download KompoZer
  • 4
    Free Manga Downloader
    Free Manga Downloader
    The Free Manga Downloader (FMD) is an
    open source application written in
    Object-Pascal for managing and
    downloading manga from various websites.
    This is a mirr...
    Download Free Manga Downloader
  • 5
    UNetbootin allows you to create bootable
    Live USB drives for Ubuntu, Fedora, and
    other Linux distributions without
    burning a CD. It runs on Windows, Linux,
    and ...
    Download UNetbootin
  • 6
    Dolibarr ERP - CRM
    Dolibarr ERP - CRM
    Dolibarr ERP - CRM is an easy to use
    ERP and CRM open source software package
    (run with a web php server or as
    standalone software) for businesses,
    Download Dolibarr ERP - CRM
  • More »

Linux commands