.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Perl::PrereqScanner::NotQuiteLite 3pm" .TH Perl::PrereqScanner::NotQuiteLite 3pm "2020-10-21" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Perl::PrereqScanner::NotQuiteLite \- a tool to scan your Perl code for its prerequisites .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 11 \& use Perl::PrereqScanner::NotQuiteLite; \& my $scanner = Perl::PrereqScanner::NotQuiteLite\->new( \& parsers => [qw/:installed \-UniversalVersion/], \& suggests => 1, \& perl_minimum_version => 1, \& ); \& my $context = $scanner\->scan_file(\*(Aqpath/to/file\*(Aq); \& my $requirements = $context\->requires; \& my $recommends = $context\->recommends; \& my $suggestions = $context\->suggests; # requirements in evals \& my $noes = $context\->noes; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Perl::PrereqScanner::NotQuiteLite is yet another prerequisites scanner. It passes almost all the scanning tests for Perl::PrereqScanner and Module::ExtractUse (ie. except for a few dubious ones), and runs slightly faster than PPI-based Perl::PrereqScanner. However, it doesn't run as fast as Perl::PrereqScanner::Lite (which uses an \s-1XS\s0 lexer). .PP Perl::PrereqScanner::NotQuiteLite also recognizes \f(CW\*(C`eval\*(C'\fR. Prerequisites in \f(CW\*(C`eval\*(C'\fR are not considered as requirements, but you can collect them as suggestions. .PP Conditional requirements or requirements loaded in a block are treated as recommends. Noed modules are stored separately (since 0.94). You may or may not need to merge them into requires. .PP Perl::PrereqScanner::NotQuiteLite can also recognize some of the new language features such as \f(CW\*(C`say\*(C'\fR, subroutine signatures, and postfix dereferences, to improve the minimum perl requirement (since 0.9905). .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" creates a scanner object. Options are: .IP "parsers" 4 .IX Item "parsers" By default, Perl::PrereqScanner::NotQuiteLite only recognizes modules loaded directly by \f(CW\*(C`use\*(C'\fR, \f(CW\*(C`require\*(C'\fR, \f(CW\*(C`no\*(C'\fR statements, plus modules loaded by a few common modules such as \f(CW\*(C`base\*(C'\fR, \&\f(CW\*(C`parent\*(C'\fR, \f(CW\*(C`if\*(C'\fR (that are in the Perl core), and by two keywords exported by Moose family (\f(CW\*(C`extends\*(C'\fR and \f(CW\*(C`with\*(C'\fR). .Sp If you need more, you can pass extra parser names to the scanner, or \f(CW\*(C`:bundled\*(C'\fR, which loads and registers all the parsers bundled with this distribution. If you have your own parsers, you can specify \f(CW\*(C`:installed\*(C'\fR to load and register all the installed parsers. .Sp You can also pass a project-specific parser (that lies outside the \&\f(CW\*(C`Perl::PrereqScanner::NotQuiteLite::Parser\*(C'\fR namespace) by prepending \f(CW\*(C`+\*(C'\fR to the name. .Sp .Vb 4 \& use Perl::PrereqScanner::NotQuiteLite; \& my $scanner = Perl::PrereqScanner::NotQuiteLite\->new( \& parsers => [qw/+PrereqParser::For::MyProject/], \& ); .Ve .Sp If you don't want to load a specific parser for some reason, prepend \f(CW\*(C`\-\*(C'\fR to the parser name. .IP "suggests" 4 .IX Item "suggests" Perl::PrereqScanner::NotQuiteLite ignores \f(CW\*(C`use\*(C'\fR\-like statements in \&\f(CW\*(C`eval\*(C'\fR by default. If you set this option to true, Perl::PrereqScanner::NotQuiteLite also parses statements in \f(CW\*(C`eval\*(C'\fR, and records requirements as suggestions. .IP "recommends" 4 .IX Item "recommends" Perl::PrereqScanner::NotQuiteLite usually ignores \f(CW\*(C`require\*(C'\fR\-like statements in a block by default. If you set this option to true, Perl::PrereqScanner::NotQuiteLite also records requirements in a block as recommendations. .IP "perl_minimum_version" 4 .IX Item "perl_minimum_version" If you set this option to true, Perl::PrereqScanner::NotQuiteLite adds a specific version of perl as a requirement when it finds some of the new perl language features. .SS "scan_file" .IX Subsection "scan_file" takes a path to a file and returns a ::Context object. .SS "scan_string" .IX Subsection "scan_string" takes a string, scans and returns a ::Context object. .SH "SEE ALSO" .IX Header "SEE ALSO" Perl::PrereqScanner, Perl::PrereqScanner::Lite, Module::ExtractUse .PP Perl::PrereqScanner::NotQuiteLite::App to scan a whole distribution. .PP scan-perl-prereqs-nqlite is a command line interface of the above. .SH "AUTHOR" .IX Header "AUTHOR" Kenichi Ishigaki, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2015 by Kenichi Ishigaki. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.