1Perl::PrereqScanner::NoUtsQeuritCeoLnittrei(b3u)ted PerlPeDrolc:u:mPernetraetqiSocnanner::NotQuiteLite(3)
2
3
4

NAME

6       Perl::PrereqScanner::NotQuiteLite - a tool to scan your Perl code for
7       its prerequisites
8

SYNOPSIS

10         use Perl::PrereqScanner::NotQuiteLite;
11         my $scanner = Perl::PrereqScanner::NotQuiteLite->new(
12           parsers => [qw/:installed -UniversalVersion/],
13           suggests => 1,
14           perl_minimum_version => 1,
15         );
16         my $context = $scanner->scan_file('path/to/file');
17         my $requirements = $context->requires;
18         my $recommends = $context->recommends;
19         my $suggestions  = $context->suggests; # requirements in evals
20         my $noes = $context->noes;
21

DESCRIPTION

23       Perl::PrereqScanner::NotQuiteLite is yet another prerequisites scanner.
24       It passes almost all the scanning tests for Perl::PrereqScanner and
25       Module::ExtractUse (ie. except for a few dubious ones), and runs
26       slightly faster than PPI-based Perl::PrereqScanner. However, it doesn't
27       run as fast as Perl::PrereqScanner::Lite (which uses an XS lexer).
28
29       Perl::PrereqScanner::NotQuiteLite also recognizes "eval".
30       Prerequisites in "eval" are not considered as requirements, but you can
31       collect them as suggestions.
32
33       Conditional requirements or requirements loaded in a block are treated
34       as recommends. Noed modules are stored separately (since 0.94).  You
35       may or may not need to merge them into requires.
36
37       Perl::PrereqScanner::NotQuiteLite can also recognize some of the new
38       language features such as "say", subroutine signatures, and postfix
39       dereferences, to improve the minimum perl requirement (since 0.9905).
40

METHODS

42   new
43       creates a scanner object. Options are:
44
45       parsers
46           By default, Perl::PrereqScanner::NotQuiteLite only recognizes
47           modules loaded directly by "use", "require", "no" statements, plus
48           modules loaded by a few common modules such as "base", "parent",
49           "if" (that are in the Perl core), and by two keywords exported by
50           Moose family ("extends" and "with").
51
52           If you need more, you can pass extra parser names to the scanner,
53           or ":bundled", which loads and registers all the parsers bundled
54           with this distribution. If you have your own parsers, you can
55           specify ":installed" to load and register all the installed
56           parsers.
57
58           You can also pass a project-specific parser (that lies outside the
59           "Perl::PrereqScanner::NotQuiteLite::Parser" namespace) by
60           prepending "+" to the name.
61
62             use Perl::PrereqScanner::NotQuiteLite;
63             my $scanner = Perl::PrereqScanner::NotQuiteLite->new(
64               parsers => [qw/+PrereqParser::For::MyProject/],
65             );
66
67           If you don't want to load a specific parser for some reason,
68           prepend "-" to the parser name.
69
70       suggests
71           Perl::PrereqScanner::NotQuiteLite ignores "use"-like statements in
72           "eval" by default. If you set this option to true,
73           Perl::PrereqScanner::NotQuiteLite also parses statements in "eval",
74           and records requirements as suggestions.
75
76       recommends
77           Perl::PrereqScanner::NotQuiteLite usually ignores "require"-like
78           statements in a block by default. If you set this option to true,
79           Perl::PrereqScanner::NotQuiteLite also records requirements in a
80           block as recommendations.
81
82       perl_minimum_version
83           If you set this option to true, Perl::PrereqScanner::NotQuiteLite
84           adds a specific version of perl as a requirement when it finds some
85           of the new perl language features.
86
87   scan_file
88       takes a path to a file and returns a ::Context object.
89
90   scan_string
91       takes a string, scans and returns a ::Context object.
92

SEE ALSO

94       Perl::PrereqScanner, Perl::PrereqScanner::Lite, Module::ExtractUse
95
96       Perl::PrereqScanner::NotQuiteLite::App to scan a whole distribution.
97
98       scan-perl-prereqs-nqlite is a command line interface of the above.
99

AUTHOR

101       Kenichi Ishigaki, <ishigaki@cpan.org>
102
104       This software is copyright (c) 2015 by Kenichi Ishigaki.
105
106       This is free software; you can redistribute it and/or modify it under
107       the same terms as the Perl 5 programming language system itself.
108
109
110
111perl v5.32.0                      2020-09-0P6erl::PrereqScanner::NotQuiteLite(3)
Impressum