NAME

Module::License::Report::Object - Encapsulation of license information

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::Object;

my $license = Module::License::Report::Object->new({...});
print $license;                     # 'perl'
print $license->source_file();      # 'META.yml'
print $license->confidence();       # '100'
print $license->package_version();  # '0.01'

DESCRIPTION

This module is intended for use with Module::License::Report. You likely will never need to use the new() method, but the others will likely be useful.

FUNCTIONS

$pkg->new({...})

Creates a new license instance. This is intended for internal use by Module::License::Report::CPANPLUSModule.

$license->name()

Returns the name of the license. This name is of the form used by Module::Build. See http://search.cpan.org/~kwilliams/Module-Build/lib/Module/Build/Authoring.pod#license for the full list.

This method is called when $license is used in string context.

$license->confidence()

Returns a confidence in the license as a number between 100 (high) and 0 (low). These confidences are subjective, and reflect how direct the determination of the license was, versus how many heuristics were used. For example, a license specified in META.yml has a very high confidence, while a string like under the same license as Perl itself parsed from README is given lower confidence.

$license->source_file()

Returns the name of the file which specified the license, relative to the distribution folder. This might be undef if the license came from the CPAN DSLIP parameter.

For example: META.yml, README.txt, lib/Foo/Bar.pm.

$license->source_filepath()

Like source_file(), but returns an absolute path.

$license->source_name()

Returns a machine-readable keyword that describes the source of the license. If more than one source was used, they are comma-separated. The list of keywords is: META.yml, DSLIP, Module, POD, and LicenseFile.

$license->source_description()

Returns a human-readable version of source_name().

$license->module_name()

Returns the name of the module that started the license search. So, if the license of package Foo-Bar is perl, this value could be any of Foo::Bar, Foo::Bar::Baz, Foo::Bar::Quux, etc.

$license->package_name()

Returns the CPAN package name for the distribution. For example, Foo-Bar.

$license->package_version()

Returns the version number of the CPAN package that was used to determine the license. For example, 0.12.03_01.

$license->package_dir()

Returns the directory name of the extracted distribution. This is typically a subdirectory of .cpanplus somewhere.

SEE ALSO

Module::License::Report

AUTHOR

Clotho Advanced Media Inc., cpan@clotho.com

Primary developer: Chris Dolan