NAME

Module::License::Report::CPANPLUSModule - Abstraction of a CPAN module

LICENSE

Copyright 2005 Clotho Advanced Media, Inc., <cpan@clotho.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SYNOPSIS

use Module::License::Report::CPANPLUS.pm
use Module::License::Report::CPANPLUSModule.pm
my $cp = Module::License::Report::CPANPLUS->new();
my $module = Module::License::Report::CPANPLUSModule->new($cp, 'Foo::Bar');
my $license = $module->license();

DESCRIPTION

This is an extension of the CPANPLUS::Module API for use by Module::License::Report. It's unlikely that you want to use this directly.

FUNCTIONS

$pkg->new($cp, $module_name)

The $cp argument is a Module::License::Report::CPANPLUS instance. The $module_name should be of a form acceptable to Module::License::Report::CPANPLUS::get_module().

$self->verbose()

Returns a boolean.

$self->license()

Returns a Module::License::Report::Object instance, or undef.

$self->license_from_file($filename)

Searches the specified file for license and/or copyright information. This uses heuristics.

$self->yml()

Loads and parses a META.yml file. Returns a hashref that has, minimally, a license field.

$self->dslip()

Parses the CPAN DSLIP metadata. Returns a hashref that has, minimally, a license field.

See http://cpan.uwinnipeg.ca/htdocs/faqs/dslip.html for more information.

$self->makefile()

Loads and parses a Makefile.PL file. Returns a hashref that has, minimally, a license field.

The parsing is very simplistic.

$self->buildfile()

Loads and parses a Build.PL file. Returns a hashref that has, minimally, a license field.

The parsing is very simplistic.

$self->version_from()

Returns the name of the file that has the definitive VERSION. This file might not exist.

This relies on parsing META.yml, Build.PL or Makefile.PL.

$self->version_from_pod()

Returns the name of a .pod file that corresponds to version_from(). This file might not exist.

$self->license_filename()

Returns the name of the file that is the most likely source of license or copyright information.

$self->root_files()

Returns a list of all files in the root of the distribution directory, like README, Makefile.PL, etc.

$self->name()

Returns the module name that was specified in the constructor.

$self->package_name()

Returns the name of the package, like Foo-Bar.

$self->package_version()

Returns the version of the package, like 0.12.04_01.

$self->extract_dir

Returns the path to the extracted distribution. If the distribution is not yet extracted, does that first.

$self->extract()

Extracts the distribution archive (perhaps a .tar.gz or a .zip file) and returns the path.

$self->fetch()

Downloads the distribution from CPAN.

AUTHOR

Clotho Advanced Media Inc., cpan@clotho.com

Primary developer: Chris Dolan