CPAN::Testers::Fact::InstalledModules - Versions of particular modules installed on a system


CPAN-Testers-Report documentation Contained in the CPAN-Testers-Report distribution.

Index


Code Index:

NAME

Top

CPAN::Testers::Fact::InstalledModules - Versions of particular modules installed on a system

VERSION

Top

version 1.999001

SYNOPSIS

Top

  my $fact = CPAN::Testers::Fact::InstalledModules->new({
    resource => 'cpan:///distfile/RJBS/CPAN-Metabase-Fact-0.001.tar.gz',
    content     => {
      prereqs => {
        'Test::More' => '0.80',
      },
      toolchain => {
        'CPAN' => '1.92', 
      },
    },
  });

DESCRIPTION

Top

Versions detected of modules installed on a system. There are three valid types: prereqs, toolchain, undeclared.

Prereqs are the versions of modules listed in any of the prerequisite fields.

Toolchain module versions are intended to reflect the state of the toolchain used to test the distribution (e.g. CPAN, Test::Harness, etc.).

Undeclared module versions capture the version of modules that were detected as being used by the distribution, but that were not listed explicitly as prerequisites. This will often be core modules or submodules, but could include missing dependencies.

USAGE

Top

See Metabase::Fact.

BUGS

Top

Please report any bugs or feature using the CPAN Request Tracker. Bugs can be submitted through the web interface at http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Testers-Report

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Top

  David Golden <dagolden@cpan.org>

COPYRIGHT AND LICENSE

Top


CPAN-Testers-Report documentation Contained in the CPAN-Testers-Report distribution.

# 
# This file is part of CPAN-Testers-Report
# 
# This software is Copyright (c) 2010 by David Golden.
# 
# This is free software, licensed under:
# 
#   The Apache License, Version 2.0, January 2004
# 
use 5.006;
use strict;
use warnings;
package CPAN::Testers::Fact::InstalledModules;
BEGIN {
  $CPAN::Testers::Fact::InstalledModules::VERSION = '1.999001';
}
# ABSTRACT: Versions of particular modules installed on a system

use Carp ();

use Metabase::Fact::Hash 0.016;
our @ISA = qw/Metabase::Fact::Hash/;

sub optional_keys { qw/prereqs toolchain undeclared/ };

sub validate_content {
  my ($self) = @_;
  $self->SUPER::validate_content;
  my $content = $self->content;
  for my $key ( keys %$content ) {
    Carp::croak "key '$key' must be a hashref" unless ref $content->{$key} eq 'HASH';
  }
}

1;




__END__