github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

gbarr / CPAN-DistnameInfo

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 3
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (8)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (4)
    • master ✓
    • next
    • svn-CPAN-DistnameInfo-0.05
    • svn-CPAN-DistnameInfo-0.06
  • Tags (8)
    • v0.09
    • v0.08
    • v0.07
    • v0.06
    • v0.05
    • v0.03
    • v0.02
    • v0.01
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Extract information from a CPAN distribution name — Read more

  cancel

http://search.cpan.org/dist/CPAN-DistnameInfo/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Release 0.09 
gbarr (author)
Thu Dec 03 16:30:28 -0800 2009
commit  d36b8990f03592144a98032c77f057fad4265b73
tree    3750256004a34039717dfecf2b502ca5a9b3c9e2
parent  98c33db99962716dd503f0a9c10ebe02ee764864
CPAN-DistnameInfo /
name age
history
message
file .gitignore Loading commit data...
file Changes
file MANIFEST
file MANIFEST.SKIP Tue May 05 19:56:42 -0700 2009 Remove old dynamic files from MANIFEST [gbarr]
file Makefile.PL
file README
directory lib/
directory t/
README
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 %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"

    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.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server