Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cpan::distnameinfo(3pm) [debian 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)

Check Out this Related Man Page

CPAN::Meta::Feature(3)					User Contributed Perl Documentation				    CPAN::Meta::Feature(3)

NAME
CPAN::Meta::Feature - an optional feature provided by a CPAN distribution VERSION
version 2.133380 DESCRIPTION
A CPAN::Meta::Feature object describes an optional feature offered by a CPAN distribution and specified in the distribution's META.json (or META.yml) file. For the most part, this class will only be used when operating on the result of the "feature" or "features" methods on a CPAN::Meta object. METHODS
new my $feature = CPAN::Meta::Feature->new( $identifier => \%spec ); This returns a new Feature object. The %spec argument to the constructor should be the same as the value of the "optional_feature" entry in the distmeta. It must contain entries for "description" and "prereqs". identifier This method returns the feature's identifier. description This method returns the feature's long description. prereqs This method returns the feature's prerequisites as a CPAN::Meta::Prereqs object. BUGS
Please report any bugs or feature using the CPAN Request Tracker. Bugs can be submitted through the web interface at <http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Meta> When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. AUTHORS
o David Golden <dagolden@cpan.org> o Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by David Golden and Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.18.2 2013-12-03 CPAN::Meta::Feature(3)
Man Page