Robert Rothenberg > Module-ParseDeps > Module::ParseDeps

Download:
Module-ParseDeps-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Module::ParseDeps - parse module dependencies from CPAN distribution

SYNOPSIS ^

  use Module::ParseDeps;

  $hashref = parsedeps('./Some-Module-Extracted-0.0/');

DESCRIPTION ^

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.

Functions

parsedeps
  $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.

Debugging

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.

SEE ALSO ^

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

AUTHOR ^

Robert Rothenberg <rrwo at cpan.org>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: