B::Fathom - a module to evaluate the readability of Perl code
perl -MO=Fathom <script>
perl -MO=Fathom,-v <script>
where <script> is the name of the Perl program that you want to evaluate.
-v activates verbose mode, which currently reports which subs have been skipped over because they seem to be imported. One can also indicate
N is some number greater than zero, to provide even more verbose diagnostics. The specifics of these modes may change in future releases. See comments in the code for further information.
There is also an OO interface, which can be used as follows:
my $fathom = B::Fathom->new('-v'); my $score = $fathom->fathom(\&foo);
See METHODS below for a more complete explanation of the OO interface.
B::Fathom is a backend to the Perl compiler; it analyzes the syntax of your Perl code, and estimates the readability of your program.
Currently, this module's idea of `readability' is based on methods used for analyzing readability of English prose. Further extensions are intended.
There is a simple object-oriented interface to B::Fathom. It consists of two methods:
This method constructs a new compiler object. The optional @args indicate compiler options; see SYNOPSIS for a list.
This method grades the subroutines referred to by @subrefs, and returns their score as a string.
Because of the nature of the compiler,
Fathom has to do some guessing about the syntax of your program. See the comments in the module for specifics.
Fathom doesn't work very well on modules yet.
Kurt Starsinic <email@example.com>
Copyright (c) 1998, 1999, 2000 Kurt Starsinic. This module is free software; you may redistribute it and/or modify it under the same terms as Perl itself.