Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cpan::api::howto(3pm) [suse man page]

CPAN::API::HOWTO(3pm)					 Perl Programmers Reference Guide				     CPAN::API::HOWTO(3pm)

NAME
CPAN::API::HOWTO - a recipe book for programming with CPAN.pm RECIPES
All of these recipes assume that you have put "use CPAN" at the top of your program. What distribution contains a particular module? my $distribution = CPAN::Shell->expand( "Module", "Data::UUID" )->distribution()->pretty_id(); This returns a string of the form "AUTHORID/TARBALL". If you want the full path and filename to this distribution on a CPAN mirror, then it is ".../authors/id/A/AU/AUTHORID/TARBALL". What modules does a particular distribution contain? CPAN::Index->reload(); my @modules = CPAN::Shell->expand( "Distribution", "JHI/Graph-0.83.tar.gz" )->containsmods(); You may also refer to a distribution in the form A/AU/AUTHORID/TARBALL. SEE ALSO
the main CPAN.pm documentation LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> AUTHOR
David Cantrell perl v5.12.1 2010-04-26 CPAN::API::HOWTO(3pm)

Check Out this Related Man Page

CPAN::DistnameInfo(3pm) 				User Contributed Perl Documentation				   CPAN::DistnameInfo(3pm)

NAME
CPAN::DistnameInfo - Extract distribution name and version from a distribution filename SYNOPSIS
my $pathname = "authors/id/G/GB/GBARR/CPAN-DistnameInfo-0.02.tar.gz"; my $d = CPAN::DistnameInfo->new($pathname); my $dist = $d->dist; # "CPAN-DistnameInfo" my $version = $d->version; # "0.02" my $maturity = $d->maturity; # "released" my $filename = $d->filename; # "CPAN-DistnameInfo-0.02.tar.gz" my $cpanid = $d->cpanid; # "GBARR" my $distvname = $d->distvname; # "CPAN-DistnameInfo-0.02" my $extension = $d->extension; # "tar.gz" my $pathname = $d->pathname; # "authors/id/G/GB/GBARR/..." my %prop = $d->properties; DESCRIPTION
Many online services that are centered around CPAN attempt to associate multiple uploads by extracting a distribution name from the filename of the upload. For most distributions this is easy as they have used ExtUtils::MakeMaker or Module::Build to create the distribution, which results in a uniform name. But sadly not all uploads are created in this way. "CPAN::DistnameInfo" uses heuristics that have been learnt by <http://search.cpan.org/> to extract the distribution name and version from filenames and also report if the version is to be treated as a developer release The constructor takes a single pathname, returning an object with the following methods cpanid If the path given looked like a CPAN authors directory path, then this will be the the CPAN id of the author. dist The name of the distribution distvname The file name with any suffix and leading directory names removed filename If the path given looked like a CPAN authors directory path, then this will be the path to the file relative to the detected CPAN author directory. Otherwise it is the path that was passed in. maturity The maturity of the distribution. This will be either "released" or "developer" extension The extension of the distribution, often used to denote the archive type (e.g. 'tar.gz') pathname The pathname that was passed to the constructor when creating the object. properties This will return a list of key-value pairs, suitable for assigning to a hash, for the known properties. version The extracted version AUTHOR
Graham Barr <gbarr@pobox.com> COPYRIGHT
Copyright (c) 2003 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2011-03-11 CPAN::DistnameInfo(3pm)
Man Page