# NAME

Perl::Metrics::Lite - Pluggable Perl Code Metrics System

# SYNOPSIS

    use Perl::Metrics::Lite;
    my $analzyer   = Perl::Metrics::Lite->new;
    my $analysis   = $analzyer->analyze_files(@ARGV);
    my $file_stats = $analysis->file_stats;
    my $sub_stats = $analysis->sub_stats;

# DESCRIPTION

__Perl::Metrics::Lite__ is the pluggable perl code metrics system.

__Perl::Metrics::Lite__ provides just enough methods to run static analysis
of one or many Perl files and obtain a few metrics.

__Perl::Metrics::Lite__ is far simpler than [Perl::Metrics](http://search.cpan.org/perldoc?Perl::Metrics) 
and more extensible than [Perl::Metrics::Simple](http://search.cpan.org/perldoc?Perl::Metrics::Simple).

# USAGE

See the `measureperl` script (included with this distribution)
for a simple example of usage.

# CLASS METHODS

## new

Takes no arguments and returns a new [Perl::Metrics::Lite](http://search.cpan.org/perldoc?Perl::Metrics::Lite) object.

## is_perl_file

Takes a path and returns true if the target is a Perl file.

# OBJECT METHODS

## analyze_files( @paths, @refs_to_file_contents )

Takes an array of files and or directory paths, and/or
SCALAR refs to file contents and returns
an [Perl::Metrics::Lite::Analysis](http://search.cpan.org/perldoc?Perl::Metrics::Lite::Analysis) object.

## find_files( @directories_and_files )

Uses _list_perl_files_ to find all the readable Perl files
and returns a reference to a (possibly empty) list of paths.

## list_perl_files

Takes a list of one or more paths and returns an
alphabetically sorted list of only the perl files.
Uses _is_perl_file_ so may throw an exception if a file is unreadable.

## is_perl_file($path)

Takes a path to a file and returns true if the file appears to be a Perl file,
otherwise returns false.

If the file name does not match any of @Perl::Metrics::Lite::PERL_FILE_SUFFIXES
then the file is opened for reading and the first line examined for a a Perl
'shebang' line. An exception is thrown if the file cannot be opened in this case.

# SOURCE AVAILABILITY

This source is in Github:

    http://github.com/dann/p5-perl-metrics-lite

# CONTRIBUTORS

Many thanks to:



# AUTHOR

Dann <techmemo{at}gmail.com>

# SEE ALSO

[Perl::Metrics](http://search.cpan.org/perldoc?Perl::Metrics)
[Perl::Metrics::Simple](http://search.cpan.org/perldoc?Perl::Metrics::Simple)

# LICENSE

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.