Branch Coverage

blib/lib/JSON/Karabiner/Manipulator.pm
Criterion Covered Total %
branch 48 78 61.5


line true false branch
19 3 27 $caller[0] eq 'main' ? :
20 1 29 if ($main::current_manip and $called_directly)
26 27 3 if $_[0] and $_[0] =~ /^JSON::Karabiner::Manipulator$/
32 3 27 if (not $main::save_to_file_name and $called_directly) { }
41 0 27 if $main::save_to_file_name
44 3 27 if ($called_directly)
45 3 0 if $main::rule_name
47 0 3 if ($save_to_dir)
70 0 0 unless $fn
72 0 0 unless ($fn =~ /\.json$/)
81 0 0 unless $sd
89 0 1 unless $title
96 0 2 unless $rule_name
110 6 12 if ($is_action_function)
123 0 12 if ($is_condition_function)
137 0 40 unless @args
141 34 6 if (ref $s) { }
152 0 31 unless $type
167 0 7 unless $type
173 5 2 if (defined $s->{'actions'}{'conditions'}) { }
184 0 1 unless $desc
190 0 1 unless $param
191 0 1 unless $value
211 0 1 unless $param_exists
214 1 0 if ($param =~ /alone/) { }
0 0 elsif ($param =~ /down/) { }
0 0 elsif ($param =~ /delay/) { }
0 0 elsif ($param =~ /simultaneous/) { }
231 11 21 unless $obj->{'_disable_validity_tests'}
245 2 1 unless (@kb_obj_args)
262 3 1 if $_[0] and ref($_[0]) =~ /^JSON::Karabiner::Manipulator$/
266 0 4 if ($title and $title =~ /\.json$/) { }
273 0 4 unless (@kb_obj_args)
277 0 1 unless $title or $main::file_title_written
278 1 3 unless ($title)
288 4 0 if ($s->{'_fake_write_flag'})
310 2 3 unless (@kb_obj_args)
323 2 9 unless (defined $from)
327 1 8 unless (%$from)