The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Build Status Coverage Status

NAME

Perl::PrereqScanner::Lite - Lightweight Prereqs Scanner for Perl

SYNOPSIS

use Perl::PrereqScanner::Lite;

my $scanner = Perl::PrereqScanner::Lite->new;
$scanner->add_extra_scanner('Moose');
my $modules = $scanner->scan_file('path/to/file');

DESCRIPTION

Perl::PrereqScanner::Lite is the lightweight prereqs scanner for perl. This scanner uses Compiler::Lexer as tokenizer, therefore processing speed is really fast.

METHODS

ADDITIONAL NOTATION

If no_prereq is enabled by new() (like so: Perl::PrereqScanner::Lite->new({no_prereq => 1})), this module recognize ## no prereq optional comment. The requiring declaration with this comment on the same line will be ignored as prereq.

For example

use Foo;
use Bar; ## no prereq

In this case Foo is the prereq, however Bar is ignored.

SPEED COMPARISON

Plain

                            Rate   Perl::PrereqScanner Perl::PrereqScanner::Lite
Perl::PrereqScanner       8.57/s                    --                      -97%
Perl::PrereqScanner::Lite  246/s                 2770%                        --

With Moose scanner

                            Rate   Perl::PrereqScanner Perl::PrereqScanner::Lite
Perl::PrereqScanner       9.00/s                    --                      -94%
Perl::PrereqScanner::Lite  152/s                 1587%                        --

SEE ALSO

Perl::PrereqScanner, Compiler::Lexer

LICENSE

Copyright (C) moznion.

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

AUTHOR

moznion moznion@gmail.com