File Coverage

blib/lib/Test/Run/Straps/StrapsDetailsObj.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 23 23 100.0


line stmt bran cond sub pod time code
1             package Test::Run::Straps::StrapsDetailsObj;
2              
3 14     14   77 use strict;
  14         31  
  14         344  
4 14     14   73 use warnings;
  14         25  
  14         460  
5              
6             =head1 NAME
7              
8             Test::Run::Straps::StrapsDetailsObj - a struct representing the details of
9             the straps class.
10              
11             =head1 DESCRIPTIONS
12              
13             Inherits from Test::Run::Base::Struct.
14              
15             =head1 METHODS
16              
17             =cut
18              
19 14     14   78 use vars qw(@fields);
  14         28  
  14         649  
20              
21 14     14   77 use Moose;
  14         28  
  14         106  
22              
23             extends('Test::Run::Base::Struct');
24              
25             sub _pre_init
26             {
27 201     201   417 my $self = shift;
28 201         9463 $self->diagnostics("");
29             }
30              
31             has 'actual_ok' => (is => "rw", isa => "Bool");
32             has 'diagnostics' => (is => "rw", isa => "Str");
33             has 'name' => (is => "rw", isa => "Str");
34             has 'ok' => (is => "rw", isa => "Num");
35             has 'reason' => (is => "rw", isa => "Str");
36             has 'type' => (is => "rw", isa => "Str");
37              
38             =head2 $self->append_to_diag($text)
39              
40             Appends $text to the diagnostics.
41              
42             =cut
43              
44             sub append_to_diag
45             {
46 19     19 1 357 my ($self, $text) = @_;
47 19         745 $self->diagnostics($self->diagnostics().$text);
48             }
49              
50             1;
51              
52             __END__
53              
54             =head1 SEE ALSO
55              
56             L<Test::Run::Base::Struct>, L<Test::Run::Obj>, L<Test::Run::Core>
57              
58             =head1 LICENSE
59              
60             This file is freely distributable under the terms of the MIT X11 License.
61              
62             L<http://www.opensource.org/licenses/mit-license.php>
63              
64             =head1 AUTHOR
65              
66             Shlomi Fish, L<http://www.shlomifish.org/>.
67              
68             =cut
69