Perl::...iteLite(3pm)
π NAME π
Perl::PrereqScanner::NotQuiteLite β bestie, it's a tool that scans ur Perl code and finds all its prereqs β¨ (this is Perl::...iteLite(3pm), from the User Contributed Perl Documentation, and she's lowkey iconic π)
β¨ SYNOPSIS β¨
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('path/to/file');
my $requirements = $context->requires;
my $recommends = $context->recommends;
my $suggestions = $context->suggests; # requirements in evals
my $noes = $context->noes;
πΈ DESCRIPTION πΈ
okay so Perl::PrereqScanner::NotQuiteLite is yet another prerequisites scanner, bc apparently we needed one more π
. She passes almost all the scanning tests for Perl::PrereqScanner and Module::ExtractUse (i.e. except for a few dubious ones β we don't claim those, no cap), and she runs slightly faster than the PPI-based Perl::PrereqScanner. But!! she doesn't run as fast as Perl::PrereqScanner::Lite, which uses an XS lexer. That one is just built different, bestie.
She also recognizes "eval" π. Prerequisites tucked inside "eval" don't count as requirements, but you can collect them as suggestions.
Conditional requirements, or requirements loaded in a block, get treated as recommends. And noed modules? They're stored separately (since 0.94). Whether you merge them into requires is a you problem β you may or may not need to π«Ά.
She can also recognize some of the new language features β like "say", subroutine signatures, and postfix dereferences β so she can improve the minimum perl requirement (since 0.9905). main character energy fr fr π
π§ METHODS π§
π new
creates a scanner object. the options are:
parsersβ by default, Perl::PrereqScanner::NotQuiteLite only spots modules loaded directly by"use","require","no"statements, plus modules pulled in by a few common modules like"base","parent","if"(all in the Perl core), and by two keywords exported by the Moose family ("extends"and"with").
If you need more, you can pass extra parser names to the scanner, or pass :bundled β which loads and registers all the parsers bundled with this distribution β¨. Got your own parsers? Specify :installed to load and register all the installed ones.
You can also pass a project-specific parser (one that lives outside the Perl::PrereqScanner::NotQuiteLite::Parser namespace) by prepending + to the name. like so:
use Perl::PrereqScanner::NotQuiteLite;
my $scanner = Perl::PrereqScanner::NotQuiteLite->new(
parsers => [qw/+PrereqParser::For::MyProject/],
);
And if you don't want a specific parser loaded, for whatever reason, prepend - to the parser name π.
suggestsβ by default, Perl::PrereqScanner::NotQuiteLite ignores"use"-like statements inside"eval". Set this option to true and she'll parse the statements in"eval"too, recording those requirements as suggestions.recommendsβ usually she ignores"require"-like statements inside a block, by default. Set this to true and she'll also record requirements in a block as recommendations.perl_minimum_versionβ set this to true and Perl::PrereqScanner::NotQuiteLite adds a specific version of perl as a requirement whenever she finds some of the new perl language features π.
π¦ scan_file
takes a path to a file and returns a ::Context object. simple as that π
π scan_string
takes a string, scans it, and returns a ::Context object. same vibe, different input β¨
π SEE ALSO π
Perl::PrereqScanner, Perl::PrereqScanner::Lite, Module::ExtractUse
Perl::PrereqScanner::NotQuiteLite::App β if you wanna scan a whole distribution π«Ά
scan-perl-prereqs-nqlite β the command line interface of the above π
π AUTHOR π
Kenichi Ishigaki, <ishigaki@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2015 by Kenichi Ishigaki.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie!! this was perl v5.40.1, dated 2026-04-21, and it's the Perl::...iteLite(3pm) page from the User Contributed Perl Documentation π go scan some prereqs, u got this πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: libperl-prereqscanner-notquitelite-perl 0.9918-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms