Branch Coverage

blib/lib/Glitch.pm
Criterion Covered Total %
branch 39 56 69.6


line true false branch
23 5 6 if (keys %import)
24 1 4 if defined $import{'glitch_config_parser'}
25 3 2 if defined $import{'glitch_config'}
26 4 1 if (defined $import{'glitch_logger'})
31 4 16 if (defined $import{$_})
36 0 0 unless $META{'stringify'}
37 0 5 if defined $import{'glitch_stringify'}
53 1 6 unless $META{'glitches'}{$options{'name'}}
74 5 0 if ($META{'logger_enabled'} and $META{'logger'})
76 5 0 $META{'logger_format'} ? :
78 5 0 $ref eq 'CODE' ? :
88 35 21 $_ =~ /(file|filepath|line|stacktrace|module)/ ? :
102 0 7 if $@
109 0 32 unless defined $struct
110 7 22 ref $struct ? :
121 7 14 if $caller[0] eq "Glitch"
124 14 0 if $caller[1] =~ m[([^/]+)$]
125 14 0 if $caller[2] =~ /(\d+)/
126 14 0 if $caller[3] =~ /([^:]+)$/
130 0 14 !($_->{'module'} =~ /^main$/) ? :
134 7 7 $_->{'sub'} ? :
136 14 0 if $_ and $_->{'module'} and $_->{'line'}
137 0 7 unless $msg->{'stacktrace'}
143 1 4 if (ref $config)
149 0 4 unless open my $fh, "<", $config
152 1 3 $META{'config_parser'} ? :
153 0 4 if $@
154 0 4 unless $content