GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Parse::LocalDistribution(3) User Contributed Perl Documentation Parse::LocalDistribution(3)

Parse::LocalDistribution - parses local .pm files as PAUSE does

    use Parse::LocalDistribution;

    my $parser = Parse::LocalDistribution->new({ALLOW_DEV_VERSION => 1});
    my $provides = $parser->parse('.');

This is a sister module of Parse::PMFile. This module parses local .pm files (and a META file if any) in a specific (current if not specified) directory, and returns a hash reference that represents "provides" information (with some extra meta data). This is almost the same as Module::Metadata does (which has been in Perl core since Perl 5.13.9). The main difference is the most of the code of this module is directly taken from the PAUSE code as of June 2013. If you need better compatibility to PAUSE, try this. If you need better performance, safety, or portability in general, Module::Metadata may be a better and handier option (Parse::PMFile (and thus Parse::LocalDistribution) actually evaluates code in the $VERSION line (in a Safe compartment), which may be problematic in some cases).

This module doesn't provide a feature to extract a distribution. If you are too lazy to implement it, CPAN::ParseDistribution may be another good option.

creates an object. You can pass an optional path and/or an optional hashref to configure. Options are:
ALLOW_DEV_VERSION
Parse::LocalDistribution (actually Parse::PMFile) usually ignores a version with an underscore as 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
If you really need to let Parse::PMFile fork while parsing a version (as PAUSE does), set this to true.
USERID, PERMISSIONS
Parse::LocalDistribution checks permissions of a package if both USERID and PERMISSIONS (which should be an instance of PAUSE::Permissions) are provided. Unauthorized packages are removed.

may take a path to a local distribution, and return a hash reference that holds information for package(s) found in the directory.

Most part of this module is derived from PAUSE.

<https://github.com/andk/pause>

The following distributions do similar parsing, though the results may differ sometimes.

Module::Metadata, CPAN::ParseDistribution

Andreas Koenig <andreas.koenig@anima.de>

Kenichi Ishigaki, <ishigaki@cpan.org>

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.

2015-01-17 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.