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

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.

Module Install Instructions

To install CPAN::DistnameInfo, simply copy and paste either of the commands in to your terminal