Branch Coverage

blib/lib/Lirc/Client.pm
Criterion Covered Total %
branch 72 120 60.0


line true false branch
29 6 0 if ($self->fake) { }
32 0 0 unless $self->sock('IO::Socket'->new('Domain', &AF_UNIX, 'Type', 1, 'Peer', $self->dev))
41 2 4 if defined $self->_startup_mode
51 2 4 if @args and ref $args[0] ne 'HASH'
58 5 1 if defined $arg_val
61 5 1 if (ref $args[0] eq 'HASH')
65 0 6 if @args
72 6 0 if (defined $self->sock)
73 0 6 unless $self->fake
82 0 9 unless open my $rcfile, '<', $rcfilename
92 110 128 if $self->debug
95 36 202 if (/^\s*begin\s*$/i)
96 0 36 if $in_block
102 36 166 if (/^\s*end\s*$/i)
103 0 36 unless $in_block
105 1 35 if (defined $$ops{'flags'} and $$ops{'flags'} =~ /\bstartup_mode\b/)
107 0 1 unless defined $$ops{'mode'}
113 0 35 unless defined $$ops{'prog'}
122 0 35 unless $$val{'prog'} eq $self->prog
130 138 28 if (/^\s*([\w-]+)\s*=\s*(.*?)\s*$/)
132 0 138 unless $tok =~ /^(prog|remote|button|repeat|config|mode|flags)$/i
140 4 24 if (/^\s*begin\s*([\w-]+)\s*$/i)
141 0 4 if $1 and $cur_mode
142 1 3 if $1 eq $self->prog
148 4 20 if (/^\s*end\s*([\w-]+)\s*$/i)
149 0 4 if $in_block
150 0 4 unless $cur_mode eq $1
158 3 17 if (/^include\s+(.*)\s*$/)
162 0 3 if $@
163 0 3 unless -r $file
170 17 0 if /^\s*$/
191 0 1 if $self->debug
196 0 1 unless defined $status
200 0 1 if $self->debug
218 0 0 defined $_ ? :
0 1 if $self->debug
220 0 1 unless scalar @lines
224 0 2 if $self->debug
226 0 0 defined $command ? :
0 2 if $self->debug
228 2 0 if defined $command
243 0 12 if $self->debug
245 0 0 defined $command ? :
0 12 if $self->debug
247 9 3 if defined $command
256 0 14 if $self->debug
261 0 14 if (/^\s*BEGIN\s*$/)
262 0 0 if $self->_in_block
266 0 14 if (/^\s*END\s*$/)
267 0 0 unless $self->_in_block
271 0 14 if $self->_in_block
277 0 14 unless (defined $button and length $button)
288 0 14 unless defined $command
292 0 14 $rep_count ? :
0 14 if $rep_count ? hex($repeat) % $rep_count : hex $repeat
294 2 12 if (defined $$command{'flags'} and $$command{'flags'} =~ /\bmode\b/)
297 1 13 if (defined $$command{'mode'})
299 3 11 unless defined $$command{'config'}
300 0 11 if $self->debug
307 2 4 if $self->debug