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   85 use strict;
  14         30  
  14         357  
4 14     14   69 use warnings;
  14         24  
  14         373  
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   71 use vars qw(@fields);
  14         44  
  14         703  
20              
21 14     14   85 use Moose;
  14         42  
  14         117  
22              
23             extends('Test::Run::Base::Struct');
24              
25             sub _pre_init
26             {
27 201     201   445 my $self = shift;
28 201         7121 $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 306 my ($self, $text) = @_;
47 19         563 $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