The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CPAN::Search::Lite::Util - export some common data structures used by CPAN::Search::Lite::*

DESCRIPTION

This module exports some common data structures used by other CPAN::Search::Lite::* modules. At present these are

  • %chaps

    This is hash whose keys are the CPAN chapter ids with associated values being the corresponding chapter descriptions.

  • %chaps_rev

    This is the reverse hash of %chaps.

  • $repositories

    This is a hash reference whose keys are repository ids. The associated values are hash references whose keys are

    alias - an alias for the repository.
    LOCATION - the url of the repository.
    SUMMARYFILE - a file on the repository to fetch when requesting a repository summary.
    browse - a url by which one can browse the contents of a repository.
    desc - a repostitory description
    build - the ActivePerl build number appropriate for the repository (eg, 6xx, for Perl 5.6, and8xx, for 5.8).
    PerlV - the Perl version that the repository supports.
  • $table_id

    This is a hash reference whose keys are the tables used and whose values are the associated primary keys.

  • $full_id

    This is a hash reference whose keys are the primary keys of the tables and whose values are the associated fully qualified primary keys (ie, with the table name prepended).

  • $mode_info

    This is a hash reference whose keys are the allowed modes of CPAN::Search::Lite::Query and whose associated values are hash references with keys id, name, and text describing what columns to use for that key.

  • $query_info

    This is a hash reference whose purpose is to provide shortcuts to making queries using CPAN::Search::Lite::Query. The keys of this reference is the shortcut name, and the associated value is a hash reference specifying the required mode and type keys.

  • $tt2_pages

    This is a hash reference whose keys are the modes used in CPAN::Search::Lite::Query and whose values are hash references (with keys search, info, and letter) specifying what Template-Toolkit page to use for the specific result.

  • vcmp

    This routine, used as

      if (vcmp($v1, $v2) > 0) {
        print "$v1 is higher than $v2\n";
      }

    is used to compare two versions, and returns 1/0/-1 if the first argument is considered higher/equal/lower than the second. It uses Sort::Versions.