Dist::Data - API to access the data of a Perl distribution file or directory
version 0.006
use Dist::Data; my $dist = Dist::Data->new('My-Sample-Distribution-0.003.tar.gz'); # Extract files into this directory, if it not already contains a distribution my $otherdist = Dist::Data->new({ dir => '/storage/extracted-dists/My-Sample-Distribution-0.003', filename => 'My-Sample-Distribution-0.003.tar.gz', }); my $otherdist_via_dir = Dist::Data->new({ dir => '/storage/extracted-dists/My-Sample-Distribution-0.003', }); my %files = %{$dist->files}; my $filename_of_distini = $dist->file('dist.ini'); # gives back CPAN::Meta if the dist has one my $cpan_meta = $dist->cpan_meta; # alternative $dist->cm; my $version = $dist->version; # handled by CPAN::Meta object my $name = $dist->name; # also my @authors = $dist->authors; my %packages = %{$dist->packages}; # via Dist::Metadata my %packages = %{$dist->namespaces}; # via Module::Extract::Namespaces my %documentations = %{$dist->documentations}; # only .pod inside of lib/ (so far) my %scripts = %{$dist->scripts}; # all files in bin/ and script/
This distribution is used to get all information from a CPAN distribution or an extracted CPAN distribution. It tries to combine the power of other modules. Longtime it should be possible to define alternative behaviour (to be more like search.cpan.org or be like metacpan.org or whatever other system that parses CPAN Distributions).
IRC
Join #duckduckgo on irc.freenode.net. Highlight Getty for fast reaction :).
Repository
http://github.com/Getty/p5-dist-data Pull request and additional contributors are welcome
Issue Tracker
http://github.com/Getty/p5-dist-data/issues
Torsten Raudssus <torsten@raudss.us> http://raudss.us/
This software is copyright (c) 2012 by DuckDuckGo, Inc. http://duckduckgo.com/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dist::Data, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Data
CPAN shell
perl -MCPAN -e shell install Dist::Data
For more information on module installation, please visit the detailed CPAN module installation guide.