Upped copyright to 2012
[Test-Smoke-Metabase.git] / lib / Test / Smoke / Fact / Config.pm
blob03cda27d5ce9cd5d773de4c944f8685a095a031e
1 package Test::Smoke::Fact::Config;
3 use strict;
4 use warnings;
6 use base "Metabase::Fact::Hash";
8 our $VERSION = "0.011";
10 sub required_keys
12 qw( arguments
13 parallel
14 debugging
16 } # required_keys
18 sub optional_keys
20 qw(
22 } # optional_keys
24 sub validate_content
26 my $self = shift;
28 my $content = $self->content;
29 $content->{arguments} ||= "[default]";
30 $content->{parallel} ||= 0;
31 $content->{debugging} ||= 0;
32 $self->SUPER::validate_content;
33 } # validate_content
35 sub content_metadata
37 my $self = shift;
38 my $content = $self->content;
40 return { map { $_ => $content->{$_} }
41 $self->required_keys, $self->optional_keys };
42 } # content_metadata
44 sub content_metadata_types
46 my $self = shift;
48 return { map { $_ => "//str" }
49 $self->required_keys, $self->optional_keys };
50 } # content_metadata_types
54 __END__
56 =head1 NAME
58 Test::Smoke::Fact::Config - The Configuration for a Test::Smoke report
60 =head1 SYNOPSIS
62 my $fact = Test::Smoke::Fact::Config->new (
63 resource => "http://perl5.git.perl.org/perl.git/8c576062",
64 content => {
65 arguments => "-Duse64bitall -DDEBUGGING",
66 parallel => 1,
67 debugging => 1,
71 =head1 DESCRIPTION
73 This fact just shows the configuration that was smoked.
75 =head2 arguments
77 A space separated list of Configure options.
79 =head2 parallel
81 A boolean value indicating if this build was tested in parallel.
82 Both L<Test::Smoke>'s C<harness_options> and the environment variable
83 C<TEST_JOBS> can enable parallel smokes.
85 =head1 SEE ALSO
87 L<Test::Smoke>, L<Test::Smoke::Metabase>, L<Metabase::Fact>.
88 L<Metabase::Fact::Hash>.
90 =head1 AUTHOR
92 H.Merijn Brand
94 =head1 COPYRIGHT AND LICENSE
96 Copyright (c) 2011-2012 by H.Merijn Brand
98 This library is free software; you can redistribute it and/or modify
99 it under the same terms as Perl itself.
101 =cut