Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    CPAN::Source 0.02

    Download button

    No screenshots available
    Downloads: 122  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Yo-An Lin | More programs
    Perl Artistic License / FREE
    May 30th, 2012, 22:47 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    CPAN::Source description

    CPAN source list data aggregator

    CPAN::Source is a Perl module to fetch, parse, aggregate all CPAN source list for you.

    Currently CPAN::Source supports 4 files from CPAN mirror. (00whois.xml, contains cpan author information, 01mailrc.txt contains author emails, 02packages.details.txt contains package information, 03modlist contains distribution status)

    CPAN::Source aggregate those data, and information can be easily retrieved.

    The distribution info is from CPAN::DistnameInfo.

    SYNOPSIS

     my $source = CPAN::Source->new(
     cache_path => '.cache',
     cache_expiry => '7 days',
     mirror => 'http://cpan.nctu.edu.tw',
     source_mirror => 'http://cpansearch.perl.org'
     );

     $source->prepare; # use LWP::UserAgent to fetch all source list files ...

     # 00whois.xml
     # 01mailrc
     # 02packages.details.txt
     # 03modlist

     $source->dists; # all dist information
     $source->authors; # all author information

     $source->package_data; # parsed package data from 02packages.details.txt.gz
     $source->modlist; # parsed package data from 03modlist.data.gz
     $source->mailrc; # parsed mailrc data from 01mailrc.txt.gz


     my $dist = $source->dists('Moose');
     my $distname = $dist->name;
     my $distvname = $dist->version_name;
     my $version = $dist->version; # attributes from CPAN::DistnameInfo
     my $meta_data = $dist->fetch_meta();

     $meta_data->{abstract};
     $meta_data->{version};
     $meta_data->{resources}->{bugtracker};
     $meta_data->{resources}->{repository};

     my $readme = $dist->fetch_readme;
     my $changes = $dist->fetch_changes;


     my $pkg = $source->package( 'Moose' );
     my $pm_content = $pkg->fetch_pm();


     my $mirror_server_timestamp = $source->stamp; # DateTime object



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    data aggregator | Perl module | CPAN sources | Perl | CPAN | data

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM