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>


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