Parse::PMFile(3)
β¨ NAME β¨
Parse::PMFile β parses a .pm file as PAUSE does π
Hiii bestie, welcome to the Parse::PMFile(3) page β yes, the manual name is right there, no cap. It's a User Contributed Perl Documentation situation, and we're gonna make it make sense. π«Ά
πΈ SYNOPSIS πΈ
use Parse::PMFile;
my $parser = Parse::PMFile->new($metadata, {VERBOSE => 1});
my $packages_info = $parser->parse($pmfile);
# if you need info about invalid versions
my ($packages_info, $errors) = $parser->parse($pmfile);
# to check permissions
my $parser = Parse::PMFile->new($metadata, {
USERID => 'ISHIGAKI',
PERMISSIONS => PAUSE::Permissions->new,
});
π¦ DESCRIPTION π¦
Okay so here's the tea: most of this module's code is taken from the PAUSE code as of April 2013, almost verbatim. That means the heart of this module should be quite stable. The author did make it not use pipe (-|), and stripped out database-related code. So if you hit any issue, it's most probably because of that modification β not because PAUSE lost its main-character energy. π
This module doesn't provide features to extract a distribution or parse meta files intentionally. Periodt.
π METHODS π
π new π
Creates an object. You can also pass a hashref taken from META.yml etc, and an optional hashref. The options are:
ALLOW_DEV_VERSIONβParse::PMFileusually ignores a version with an underscore, just like PAUSE does (because it's for a developer release, and should not be indexed). Set this option to true if you happen to need to keep such a version for better analysis. πVERBOSEβ set this to true if you need to know some details.FORKβ as of version0.17,Parse::PMFilestops forking while parsing a version for better performance.Parse::PMFileshould return the same result no matter how this option is set, but if you do care, set this to true to fork as PAUSE does.USERID,PERMISSIONSβ as of version0.21,Parse::PMFilechecks permissions of a package if bothUSERIDandPERMISSIONS(which should be an instance ofPAUSE::Permissions) are provided. Unauthorized packages are removed.UNSAFEβParse::PMFileusually parses a module version in aSafecompartment. However, this approach doesn't work smoothly under older perls (prior to5.10) plus some combinations of recent versions ofSafe.pm(2.24and above) andversion.pm(0.9905and above) for various reasons. As of version0.27,Parse::PMFilesimply usesevalto parse a version under older perls. If you want it to use alwayseval(even under recent perls), set this to true. π«Ά
π
parse π
Takes a path to a .pm file, and returns a hash reference that holds information for package(s) found in the file. Slay. β¨
π SEE ALSO π
Parse::LocalDistribution,PAUSE::Permissions
Most part of this module is derived from PAUSE and CPAN::Version.
π AUTHOR π
Andreas Koenig <andreas.koenig@anima.de>
Kenichi Ishigaki, <ishigaki@cpan.org>
π COPYRIGHT AND LICENSE π
Legal moment, bestie β keep it cute but exact:
Copyright 1995 - 2013 by Andreas Koenig <andk@cpan.org> for most of the code. Copyright 2013 by Kenichi Ishigaki for some. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π«Ά POD ERRORS π«Ά
Hey! The above document had some coding errors, which are explained below:
Around line 381:
=pod directives shouldn't be over one line long! Ignoring all 10 lines of content
Sending you a lil kiss from perl v5.42.0, dated 2024-04-22 β mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Parse-PMFile 0.470.0-bp160.1.4 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms