Parse::LocalDistribution - parses local .pm files as PAUSE does
use Parse::LocalDistribution; local $Parse::PMFile::ALLOW_DEV_VERSION = 1; my $parser = Parse::LocalDistribution->new; 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) forks internally and actually evaluates code in the $VERSION line (in a Safe compartment), both of 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.
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.
The following distributions do similar parsing, though the results may differ sometimes.
Andreas Koenig <email@example.com>
Kenichi Ishigaki, <firstname.lastname@example.org>
Copyright 1995 - 2013 by Andreas Koenig <email@example.com> 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.