Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Module::CPANTS
CPAN Module Testing

Module::CPANTS - CPAN Module Testing


NAME

Module::CPANTS - CPAN Module Testing


SYNOPSIS


  use Module::CPANTS;

  my $c = Module::CPANTS->new();

  my $cpants = $c->data;


DESCRIPTION

This is an initial stab at providing automated testing metrics for the modules on CPAN. Alpha release and all that. It's just out there to test the waters.

CPANTS was initially described by Michael Schwern a long time ago in: http://archive.develooper.com/perl-qa@perl.org/msg00148.html It is highly recommended that you read that.

The idea is to have automated module testing reporting back all sorts of metadata about the modules on CPAN.

The current interface is a large hash. The keys in the hash are distributions. For example, the information available for Acme-Colour-0.20.tar.gz is accessible using:


  my $dist = 'Acme-Colour-0.20.tar.gz';

  my $data = $cpants->{$dist};

The actual information currently returned is as follows:


  'Acme-Colour-0.20.tar.gz' => {

    'author' => 'LBROCARD',

    'description' => 'additive and subtractive human-readable colours',

    'files' => [

      'Makefile.PL',

      'README',

      'MANIFEST'

    ],

    'lines' => {

      'nonpod' => 170,

      'pod' => 95,

      'pod_errors' => 0,

      'total' => 265,

      'with_comments' => 8,

    },

    'releases' => '5',

    'requires' => [

      'Graphics-ColorNames-0.32.tar.gz',

      'Scalar-List-Utils-1.11.tar.gz',

      'Test-Simple-0.47.tar.gz'

    ],

    'requires_module' => {

      'Graphics::ColorNames' => 0,

      'List::Util' => 0,

      'Test::Simple' => 0

    },

    'requires_recursive' => [

      'File-Spec-0.82.tar.gz',

      'Graphics-ColorNames-0.32.tar.gz',

      'Scalar-List-Utils-1.11.tar.gz',

      'Test-Harness-2.28.tar.gz',

      'Test-Simple-0.47.tar.gz'

    ],

    'size' => {

      'packed' => 3883,

      'unpacked' => 13078

    },

    'testers' => {

      'fail' => 1,

      'pass' => 5

    },

    'uses' => [

      'Graphics::ColorNames',

      'List::Util',

      'strict',

      'vars'

    ]

  }

The ``author'' field is the PAUSE ID of the author of the distribution.

The ``description'' field is the description listed in the CPAN modules list for the distribibution.

The ``lines'' field shows the number of POD lines (documentation), number of POD errors reported by Pod::Simple::Checker, non-POD lines (code), lines with comments, and total lines in all the modules in a distribution.

The ``files'' field is a listref containing interesting files which were found. The following files are deemed interesting at the moment: Makefile.PL, README, Build.PL, META.yml, SIGNATURE, MANIFEST.

The ``releases'' field contains the total number of releases to CPAN that distribution has.

The ``requires_module'' field is a hashref containing the module prerequisites listed in the Makefile.PL for the distribution.

The ``requires'' field is a listref containing all the distributions containing the module prerequisite listed in the Makefile.PL for the distribution.

The ``requires_recursive'' is the same as ``requires'' but lists the recursive dependencies. This should be all the distributions that the distribution needs to run.

The ``size'' contains two fields: the packed and unpacked size of the distribution in bytes.

The ``testers'' field contains the number of passes and fails reported by the CPAN testers (http://testers.cpan.org/). The ``tests'' subfield returns the number of tests in that distribution (this is only available for a limited number of distributions at the moment).

More data is to be added soon. A kwalitee rating may be added soon.

Note that CPANPLUS is very useful for relating modules to distributions.


AUTHOR

Leon Brocard <acme@astray.com>


LICENSE

This code is distributed under the same license as Perl.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy