Package Info

perl-CPAN-DistnameInfo


Extract distribution name and version from a distribution filename


Development/Libraries/Perl

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 the http://search.cpan.org/ manpage 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


License: GPL-1.0+ or Artistic-1.0
URL: http://search.cpan.org/dist/CPAN-DistnameInfo/

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.12-bp156.3.1 info GA Release 2023-07-22 15 SP6
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-CPAN-DistnameInfo
0.12-bp155.2.12 info GA Release 2023-05-17 15 SP5
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-CPAN-DistnameInfo
0.12-bp154.1.29 info GA Release 2022-05-09 15 SP4
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-CPAN-DistnameInfo
0.12-bp153.1.16 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-CPAN-DistnameInfo
0.12-bp152.3.19 info GA Release 2020-04-16 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-CPAN-DistnameInfo
0.12-bp151.3.1 info GA Release 2019-07-16 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-CPAN-DistnameInfo
0.12-bp151.2.14 info GA Release 2019-05-18 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-CPAN-DistnameInfo
0.12-bp150.2.4 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-CPAN-DistnameInfo