File Coverage

blib/lib/Devel/Monitor/TraceItem.pm
Criterion Covered Total %
statement 17 17 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 0 3 0.0
total 24 27 88.8


line stmt bran cond sub pod time code
1             package Devel::Monitor::TraceItem;
2 1     1   5 use strict;
  1         2  
  1         32  
3 1     1   5 use warnings;
  1         2  
  1         137  
4            
5             sub new {
6 155     155 0 216 my ($class, $varRef, $source) = @_;
7 155         219 my $self = {};
8 155         354 bless($self => $class);
9 155         288 $self->{_varRef} = $varRef;
10 155         236 $self->{_source} = $source;
11 155         422 return $self;
12             }
13            
14 184     184 0 713 sub getVarRef { return shift->{_varRef}; }
15             sub getSource {
16 236     236 0 269 my $self = shift;
17 236 100       419 if ($self->{_source}) {
18 216         767 return $self->{_source};
19             } else {
20 20         61 return '';
21             }
22             }
23            
24             1;