Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    CPAN::SQLite 0.199

    Download button

    No screenshots available
    Downloads: 520  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.5/5)
    18 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Randy Kobes | More programs
    Perl Artistic License / FREE
    April 21st, 2008, 13:47 GMT [view history]
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    CPAN::SQLite description

    A Perl module that allows you to maintain and search a minimal CPAN database.

    CPAN::SQLite is a Perl module that allows you to maintain and search a minimal CPAN database.

    SYNOPSIS

    my $obj = CPAN::SQLite->new(CPAN => '/path/to/CPAN');
    $obj->index(setup => 1);

    $obj->query(mode => 'dist', name => 'CPAN');
    my $results = $obj->{results};


    This package is used for setting up, maintaining, and searching a CPAN database consisting of the information stored in the three main CPAN indices: $CPAN/modules/03modlist.data.gz, $CPAN/modules/02packages.details.txt.gz, and $CPAN/authors/01mailrc.txt.gz. It should be considered at an alpha stage of development.

    One begins by creating the object as

    my $obj = CPAN::SQLite->new(%args);

    which accepts the following arguments:

    * CPAN => '/path/to/CPAN'

    This specifies the path to where the index files are to be stored. This could be a local CPAN mirror, defined here by the presence of a MIRRORED.BY file beneath this directory, or a local directory in which to store these files from a remote CPAN mirror. In the latter case, the index files are fetched from a remote CPAN mirror, using the same list that CPAN.pm uses, if this is configured, and are updated if they are more than one day old.

    If the CPAN option is not given, it will default to cpan_home of CPAN, if this is configured, with the index files found under keep_source_where. A fatal error results if such a directory isn't found. Updates to these index files are assumed here to be handled by CPAN.pm.

    * db_dir => '/path/to/db/dir'

    This specifies the path to where the database file is found. If not given, it defaults to the cpan_home directory of CPAN.pm, if present, or to the directory in which the script was invoked. The name of the database file is cpandb.sql.

    There are two main methods available.
    $obj->index(%args);

    This is used to set up and maintain the database. The following arguments are accepted:

    * setup => 1

    This specifies that the database is to be created and populated from the CPAN indices; any exisiting database will be overwritten. Not specifying this option will assume that an existing database is to be updated.
    * reindex => 'dist_name'

    This specifies that the CPAN distribution dist_name is to be reindexed.

    $obj->query(%args);

    This is used for querying the database by distribution name, module name, or CPAN author name. There are two arguments needed to specify such queries.

    * mode => some_value

    This specifies what type of query to perform, with mode being one of dist, module, or author, for searching through, respectively, CPAN distribution names, module names, or author names and CPAN ids.
    * type => query_term

    This specifies the query term for the search, with type being one of name, to search for an exact match, or search, for searching for partial matches. Perl regular expressions are supported in the query_term for the search option.

    As well, an option of max_results => some_number will limit the number of results returned; if not specified, this defaults to 200.

    Product's homepage

    Requirements:

    · Perl

    What's New in This Release: [ read full changelog ]

    · require CPAN::DistnameInfo 0.09, which normalizes dist() for CGI.pm (reported by Pete Armstrong)

      


    TAGS:

    maintain CPAN database | search CPAN database | Perl module | CPAN | SQL | SQLite

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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