Module::ParseDeps - parse module dependencies from CPAN distribution
use Module::ParseDeps; $hashref = parsedeps('./Some-Module-Extracted-0.0/');
This module will scan a directory containing an extracted CPAN distribution for meta files (*.meta or META.yml) or Makefile.PL and parse those to determine which modules that distribution claims to require.
It assumes that the distribution accurately notes required modules.
$hashref = parsedeps( $directory, $recurse );
Given a directory which contains an extracted CPAN distribution, it
parsedeps searches for meta files or Makefile.PL and returns a hash reference of their required modules, where the keys are the modules and the values are the version numbers.
If multiple Makefile.PL files are present, they are merged.
There is a debugging hook in the module used for tracing problems:
$Module::ParseDeps::DEBUG = 1;
This is only used for tracing recursive directory searches, but may include other features in the future. Or the interface may be completely changed.
These other modules will also provide meta-information about CPAN distributions:
Module::CoreList Module::Info Module::Dependency Module::Depends Module::MakefilePL::Parse Module::PrintUsed Module::ScanDeps
Robert Rothenberg <rrwo at cpan.org>
Copyright (C) 2004 by Robert Rothenbeg. All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.