Build Status

NAME

Distribution::Metadata - gather distribution metadata in local

SYNOPSIS

use Distribution::Metadata;

my $info = Distribution::Metadata->new_from_module("LWP::UserAgent");

print $info->name;      # libwww-perl
print $info->version;   # 6.13
print $info->distvname; # libwww-perl-6.13
print $info->author;    # ETHER
print $info->pathname;  # E/ET/ETHER/libwww-perl-6.13.tar.gz

print $info->main_module;         # LWP
print $info->main_module_version; # 6.13
print $info->main_module_file;    # path of LWP.pm

print $info->packlist;       # path of .packlist
print $info->meta_directory; # path of .meta directory
print $info->install_json;   # path of install.json
print $info->mymeta_json;    # path of MYMETA.json

my $files = $info->files; # files which are listed in .packlist

my $install_json_hash = $info->install_json_hash;
my $mymeta_json_hash  = $info->mymeta_json_hash;

DESCRIPTION

(CAUTION: This module is still in development phase. API will change without notice.)

Sometimes we want to know: Where this module comes from? Which distribution does this module belong to?

Since cpanm 1.5000 (released 2011.10.13), it installs not only modules but also their meta data. So we can answer that questions!

Distribution::Metadata gathers distribution metadata in local. That is, this module tries to gather

Please note that as mentioned above, this module deeply depends on cpanm behavior. If you install cpan modules by hands or some cpan clients other than cpanm, this module won't work.

HOW IT WORKS

Let me explain how $class->new_from_module($module, inc => $inc) works.

CONSTRUCTORS

METHODS

Please note that the following methods return false when appropriate modules or files cannot be found.

SEE ALSO

Module::Metadata

App::cpanminus

LICENSE

Copyright (C) Shoichi Kaji.

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

AUTHOR

Shoichi Kaji skaji@cpan.org