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::Appuses all the bundled parsers by default, but you can change that if you need your own parsers. SeePerl::PrereqScanner::NotQuiteLitefor details.recommends,suggests,perl_minimum_versionβ normallyPerl::PrereqScanner::NotQuiteLite::Appreturns"use"d modules only, but you can flip this behavior by setting these options. SeePerl::PrereqScanner::NotQuiteLitefor the deets.developβ if set,Perl::PrereqScanner::NotQuiteLite::Appalso scans files under"xt"and"author"directories to find requirements for development. Dev-mode era. π₯exclude_coreβ if set,Perl::PrereqScanner::NotQuiteLite::Appignores prerequisites that are bundled with Perl (of5.008001by default, or of a"use"d perl version if any). This requiresModule::CoreListversion2.99or 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::Appusually 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: ifTest::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::Appusually 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::Appusually 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::Appusually lists all the"use"d modules as prerequisites, but some of them may belong to the same distribution. If an instance ofCPAN::Common::Indexbackend 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>
π 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.
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
- 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