Perl::...e::App(3pm)

✨ NAME ✨

Perl::PrereqScanner::NotQuiteLite::App β€” it's the app-side bestie of the whole scanner situation, and yeah, it's chillin' in the User Contributed Perl Documentation for Perl::...e::App(3pm) πŸ’–


🌸 SYNOPSIS 🌸

Two ways to slide in, pick ur fighter:

scan-perl-prereqs-nqlite [options] [DIRS|FILES]

-or-

use Perl::PrereqScanner::NotQuiteLite::App;

my $app = Perl::PrereqScanner::NotQuiteLite::App->new(
  parsers => [qw/:bundled/],
  suggests => 1,
  perl_minimum_version => 1,
);
my $prereqs = $app->run;

Like, the command-line version is giving convenience, and the Perl-object version is giving I need control over my life energy. Both valid. Both slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so Perl::PrereqScanner::NotQuiteLite::App literally walks down a directory and scans appropriate files to find prerequisites. That's the whole gig and it's iconic for it.

Most of the time you do not need to touch this module directly β€” it just does its thing in the background, unbothered, moisturised, in its lane. BUT. If you want finer control (say, to use a custom CPAN index etc), then yeah, come hang out, you're gonna want to poke at it. πŸ’œ


πŸŽ€ METHODS πŸŽ€

🌈 new

creates an object. Notable options are:

  • parsers β€” Perl::PrereqScanner::NotQuiteLite::App uses all the bundled parsers by default, but you can change that if you need your own parsers. See Perl::PrereqScanner::NotQuiteLite for details.
  • recommends, suggests, perl_minimum_version β€” normally Perl::PrereqScanner::NotQuiteLite::App returns "use"d modules only, but you can flip this behavior by setting these options. See Perl::PrereqScanner::NotQuiteLite for the deets.
  • develop β€” if set, Perl::PrereqScanner::NotQuiteLite::App also scans files under "xt" and "author" directories to find requirements for development. Dev-mode era. πŸ”₯
  • exclude_core β€” if set, Perl::PrereqScanner::NotQuiteLite::App ignores prerequisites that are bundled with Perl (of 5.008001 by default, or of a "use"d perl version if any). This requires Module::CoreList version 2.99 or above. No cap, check ur version first. ⭐
  • perl_version β€” you can explicitly use this option to exclude core modules of a specific perl version. Be specific, bestie.
  • allow_test_pms β€” so, Perl::PrereqScanner::NotQuiteLite::App usually ignores ".pm" files under "t/" directory if they are not used in ".t" files, considering they are some kind of sample files. Cute assumption, honestly. However β€” this assumption may be wrong sometimes 😭. If this option is set, it scans all the ".pm" files under "t/" directory, considering some of the test modules will use them. And plot twist: if Test::Class (or its equivalent) is used in a test file, this option is implicitly set. It auto-detects. Main character behavior fr.
  • base_dir β€” Perl::PrereqScanner::NotQuiteLite::App usually starts traversing from the current directory. If this option is set, it starts from there instead. Root yourself somewhere else. 🌱
  • scan_also β€” Perl::PrereqScanner::NotQuiteLite::App usually scans ".pm" files in the base dir, "Makefile.PL"/"Build.PL", files under "lib", "t", "bin", script(s) directories (and "xt", "author" if asked). If your distribution uses a different file layout, or uses extra directories to keep submodules, you can add (a reference to) a list of paths to scan. Custom layout? Handled. πŸ’…
  • ignore, ignore_re β€” your distribution may have OS-specific modules whose prerequisites can not be installed in other platforms. Very much a sorry bestie, that's a you-machine thing situation. You can specify (a reference to) a list of files that should not be scanned (with "ignore" option), or a regular expression that matches the files (with "ignore_re" option).
  • features β€” ok look at this:
my $app = Perl::PrereqScanner::NotQuiteLite::App->new(
  features => {
    'windows' => {
      description => 'Windows support',
      paths => ['lib/Foo/Win32.pm'],
    }
  },
);

Instead of ignoring a set of files, you can use "features" option to let their prerequisites belong to a specific feature that will not be installed unless asked. She's shelved, not deleted ✨. However β€” you are advised to create a separate distribution for the specific feature. That's the actual recommendation, don't fight it.

  • optional, optional_re β€” instead of ignoring a set of files, you can also use "optional" option to mark all the prerequisites found in some of the files in your distribution optional (i.e. suggests). You can specify (a reference to) a list of files (with "optional" option), or a regular expression that matches the files (with "optional_re" option). Not required, just nice to have energy. 🫢
  • private, private_re β€” your distribution may use private modules that are not uploaded to the CPAN and thus should not be included in "cpanfile". You can specify (a reference to) a list of those private modules (with "private" option) or a regular expression that matches those modules (with "private_re" option). Keep ur secrets, private. πŸ™ˆ
  • use_index, index β€” Perl::PrereqScanner::NotQuiteLite::App usually lists all the "use"d modules as prerequisites, but some of them may belong to the same distribution. If an instance of CPAN::Common::Index backend is passed, it is used to dedupe those prerequisites (as long as they are not versioned). Like so:
use CPAN::Common::Index::LocalPackage;
my $index = CPAN::Common::Index::LocalPackage->new(
  { source => "$ENV{HOME}/minicpan/modules/02packages.details.txt" }
);
my $app = Perl::PrereqScanner::NotQuiteLite::App->new(
  index => $index,
);

Dedupe era. Less noise, more slay. 🧚

🌟 run

traverses files and directories and returns a CPAN::Meta::Prereqs object that keeps all the requirements/suggestions, without printing anything unless you explicitly pass a "print" option to "new". Silent queen β€” it does the work and doesn't yap unless you ask it to yap. πŸ‘‘

πŸ’« index

returns a CPAN::Common::Index backend object (if any). That's it, that's the method, short and sweet. πŸ“


πŸ’– 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.


okay that's the whole page, you read it all, I'm so proud of you πŸ₯Ή

and a lil sign-off bestie: this was perl v5.40.1, dated 2026-04-21, and yes, it's the Perl::...e::App(3pm) page β€” periodt. πŸ’…πŸŒˆβ­

πŸ“¦ where this page comes from