Branch Coverage

blib/lib/Power/Outlet/MQTT.pm
Criterion Covered Total %
branch 8 90 8.8


line true false branch
104 0 1 if @_
105 1 0 unless (defined $self->{'secure'})
106 0 1 $self->port eq '8883' ? :
121 0 0 if @_
122 0 0 unless $self->{'device'}
136 0 0 if @_
137 0 0 unless $self->{'relay'}
151 0 0 if @_
152 0 0 if not $self->{'publish_topic'} and defined $self->device
153 0 0 unless $self->{'publish_topic'}
167 0 0 if @_
168 0 0 if not $self->{'publish_on'} and defined $self->publish_topic
169 0 0 unless $self->{'publish_on'}
183 0 0 if @_
184 0 0 if not $self->{'publish_off'} and defined $self->publish_topic
185 0 0 unless $self->{'publish_off'}
199 0 0 if @_
200 0 0 if not $self->{'publish_switch'} and defined $self->publish_topic
201 0 0 unless $self->{'publish_switch'}
215 0 0 if @_
216 0 0 if not $self->{'publish_query'} and defined $self->publish_topic
217 0 0 unless $self->{'publish_query'}
231 0 0 if @_
232 0 0 if not $self->{'subscribe_topic'} and defined $self->device
233 0 0 unless $self->{'subscribe_topic'}
247 0 0 if @_
248 0 0 unless defined $self->{'subscribe_value_on'}
262 0 0 if @_
263 0 0 unless defined $self->{'subscribe_value_off'}
277 0 1 if @_
278 1 0 unless defined $self->{'user'}
294 0 0 if @_
295 0 0 unless defined $self->{'password'}
327 0 0 defined wantarray ? :
339 0 0 defined wantarray ? :
349 0 0 defined wantarray ? :
363 0 0 if ($topic_message =~ /\A([^+]+)\+(.*)\Z/) { }
388 0 0 if $error
392 0 0 !($error || ref $off) && $message eq $off ? :
0 0 !($error || ref $on) && $message eq $on ? :
0 0 !$error && ref $off eq 'Regexp' && $message =~ /$off/ ? :
0 0 !$error && ref $on eq 'Regexp' && $message =~ /$on/ ? :
412 1 0 unless ($self->{'mqtt'})
414 0 1 $self->secure ? :
416 0 1 if $self->user