Condition Coverage

blib/lib/Device/BusPirate.pm
Criterion Covered Total %
condition 7 16 43.7


or 2 conditions

line l !l condition
27 0 7 $ENV{'BUS_PIRATE'} || '/dev/ttyUSB0'
28 0 7 $ENV{'PIRATE_DEBUG'} // 0
112 0 0 $args{'serial'} || '/dev/ttyUSB0'
113 0 0 $args{'baud'} || 115200
196 5 100 $timeout // 2

or 3 conditions

line l !l&&r !l&&!r condition
111 6 0 0 $args{'fh'} // do { my $serial = $args{'serial'} || '/dev/ttyUSB0'; my $baud = $args{'baud'} || 115200; croak("Cannot open serial port $serial - $!") unless my $fh = 'IO::Termios'->open($serial, "$baud,8,n,1", 2304); foreach $_ ($fh->getattr) { $_->cfmakeraw; $_->setflag_clocal(1); $fh->setattr($_); } ; $fh->blocking(0); $fh }
238 7 2 0 $self->{'mutex'} //= 'Future::Mutex'->new