File Coverage

blib/lib/Test/Class/Moose/Role/Reporting.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1             package Test::Class::Moose::Role::Reporting;
2              
3             # ABSTRACT: Reporting gathering role
4              
5 30     30   104313 use strict;
  30         84  
  30         1572  
6 30     30   163 use warnings;
  30         63  
  30         1878  
7 30     30   187 use namespace::autoclean;
  30         60  
  30         317  
8              
9 30     30   3964 use 5.010000;
  30         200  
10              
11             our $VERSION = '1.00';
12              
13 30     30   226 use Moose::Role;
  30         66  
  30         419  
14             with 'Test::Class::Moose::Role::HasTimeReport';
15              
16             has 'name' => (
17             is => 'ro',
18             isa => 'Str',
19             required => 1,
20             );
21              
22             has 'notes' => (
23             is => 'rw',
24             isa => 'HashRef',
25             default => sub { {} },
26             );
27              
28             has 'skipped' => (
29             is => 'rw',
30             isa => 'Str',
31             predicate => 'is_skipped',
32             );
33              
34             has 'passed' => (
35             is => 'rw',
36             isa => 'Bool',
37             default => 0,
38             );
39              
40             1;
41              
42             __END__
43              
44             =pod
45              
46             =encoding UTF-8
47              
48             =head1 NAME
49              
50             Test::Class::Moose::Role::Reporting - Reporting gathering role
51              
52             =head1 VERSION
53              
54             version 1.00
55              
56             =head1 DESCRIPTION
57              
58             Note that everything in here is experimental and subject to change.
59              
60             =head1 IMPLEMENTS
61              
62             L<Test::Class::Moose::Role::HasTimeReport>.
63              
64             =head1 REQUIRES
65              
66             None.
67              
68             =head1 PROVIDED
69              
70             =head1 ATTRIBUTES
71              
72             =head2 C<name>
73              
74             The "name" of the statistic. For a class, this should be the class name. For a
75             method, it should be the method name.
76              
77             =head2 C<notes>
78              
79             A hashref. The end user may use this to store anything desired.
80              
81             =head2 C<skipped>
82              
83             If the class or method is skipped, this will return the skip message.
84              
85             =head2 C<is_skipped>
86              
87             Returns true if the class or method is skipped.
88              
89             =head2 C<passed>
90              
91             Returns true if the class or method passed.
92              
93             =head2 C<time>
94              
95             (From L<Test::Class::Moose::Role::HasTimeReport>)
96              
97             Returns a L<Test::Class::Moose::Report::Time> object. This object represents
98             the duration of this class or method.
99              
100             =head1 SUPPORT
101              
102             Bugs may be submitted at L<https://github.com/Test-More/test-class-moose/issues>.
103              
104             =head1 SOURCE
105              
106             The source code repository for Test-Class-Moose can be found at L<https://github.com/Test-More/test-class-moose>.
107              
108             =head1 AUTHORS
109              
110             =over 4
111              
112             =item *
113              
114             Curtis "Ovid" Poe <ovid@cpan.org>
115              
116             =item *
117              
118             Dave Rolsky <autarch@urth.org>
119              
120             =item *
121              
122             Chad Granum <exodist@cpan.org>
123              
124             =back
125              
126             =head1 COPYRIGHT AND LICENSE
127              
128             This software is copyright (c) 2012 - 2025 by Curtis "Ovid" Poe.
129              
130             This is free software; you can redistribute it and/or modify it under
131             the same terms as the Perl 5 programming language system itself.
132              
133             The full text of the license can be found in the
134             F<LICENSE> file included with this distribution.
135              
136             =cut