Branch Coverage

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


line true false branch
13 5 6 if (keys %import)
14 1 4 if defined $import{'glitch_config_parser'}
15 3 2 if defined $import{'glitch_config'}
16 4 1 if (defined $import{'glitch_logger'})
21 4 16 if (defined $import{$_})
26 0 0 unless $META{'stringify'}
27 0 5 if defined $import{'glitch_stringify'}
47 1 6 unless $META{'glitches'}{$options{'name'}}
68 5 0 if ($META{'logger_enabled'} and $META{'logger'})
70 5 0 $META{'logger_format'} ? :
72 5 0 $ref eq 'CODE' ? :
81 35 21 $_ =~ /(file|filepath|line|stacktrace|module)/ ? :
95 0 7 if $@
102 0 32 unless defined $struct
103 7 22 ref $struct ? :
114 7 14 if $caller[0] eq "Glitch"
117 14 0 if $caller[1] =~ m[([^/]+)$]
118 14 0 if $caller[2] =~ /(\d+)/
119 14 0 if $caller[3] =~ /([^:]+)$/
123 0 14 !($_->{'module'} =~ /^main$/) ? :
127 7 7 $_->{'sub'} ? :
129 14 0 if $_ and $_->{'module'} and $_->{'line'}
130 0 7 unless $msg->{'stacktrace'}
136 1 4 if (ref $config)
142 0 4 unless open my $fh, "<", $config
145 1 3 $META{'config_parser'} ? :
146 0 4 if $@
147 0 4 unless $content