Condition Coverage

blib/lib/Hydrogen/ArrayRef.pm
Criterion Covered Total %
condition 20 99 20.2


and 3 conditions

line !l l&&!r l&&r condition
113 0 0 2 @_ >= 2 and @_ <= 3
129 0 0 2 defined $tmp and not ref $tmp
348 0 0 0 defined $tmp and not ref $tmp
489 0 0 2 @_ >= 1 and @_ <= 2
507 0 0 1 defined $tmp and not ref $tmp
522 2 1 1 defined $d && $d < 0
648 0 0 3 defined $tmp and not ref $tmp
727 0 0 0 defined $tmp and not ref $tmp
789 0 0 1 defined $tmp and not ref $tmp
839 0 0 2 @_ >= 1 and @_ <= 2
992 0 0 1 @_ >= 2 and @_ <= 3
1008 0 0 1 defined $tmp and not ref $tmp
1256 0 0 0 @_ >= 1 and @_ <= 2
1274 0 0 0 defined $tmp and not ref $tmp
1289 0 0 0 wantarray and @_ - 1
1330 0 0 0 @_ >= 1 and @_ <= 3
1349 0 0 0 builtin::blessed($_[1]) and $_[1]->isa("IO::Handle")
0 0 0 ref $_[1] and &Scalar::Util::openhandle($_[1])
1563 0 0 0 defined $tmp and not ref $tmp
1605 0 0 1 defined $tmp and not ref $tmp
1709 0 0 0 @_ >= 1 and @_ <= 2
1756 0 0 0 @_ >= 1 and @_ <= 2
1808 0 0 0 defined $tmp and not ref $tmp
1823 0 0 0 defined $tmp and not ref $tmp
1882 0 0 0 defined $tmp and not ref $tmp

or 3 conditions

line l !l&&r !l&&!r condition
147 1 1 0 $__signature ||= sub { my(%tmp, $tmp); Hydrogen::croak("Wrong number of parameters in signature for %s: got %d, %s", "accessor", scalar @_, "expected exactly 2 parameters") unless @_ >= 2 and @_ <= 3; Hydrogen::croak("Type check failed in signature for accessor: %s should be %s", "\$_[0]", "ArrayRef") unless ref $_[0] eq "ARRAY"; Hydrogen::croak("Type check failed in signature for accessor: %s should be %s", "\$_[1]", "Int") unless do { my $tmp = $_[1]; $tmp =~ /\A-?[0-9]+\z/ if defined $tmp and not ref $tmp }; return @_ unless $#_ >= 2; '???'; @_; }
516 1 1 0 $__signature ||= sub { my(%tmp, $tmp); Hydrogen::croak("Wrong number of parameters in signature for %s: got %d, %s", "flatten_deep", scalar @_, "expected exactly 1 parameters") unless @_ >= 1 and @_ <= 2; Hydrogen::croak("Type check failed in signature for flatten_deep: %s should be %s", "\$_[0]", "ArrayRef") unless ref $_[0] eq "ARRAY"; return @_ unless $#_ >= 1; Hydrogen::croak("Type check failed in signature for flatten_deep: %s should be %s", "\$_[1]", "Optional[Int]") unless do { my $tmp = $_[1]; $tmp =~ /\A-?[0-9]+\z/ if defined $tmp and not ref $tmp }; @_; }
866 1 1 0 $__signature ||= sub { my(%tmp, $tmp); Hydrogen::croak("Wrong number of parameters in signature for %s: got %d, %s", "join", scalar @_, "expected exactly 1 parameters") unless @_ >= 1 and @_ <= 2; Hydrogen::croak("Type check failed in signature for join: %s should be %s", "\$_[0]", "ArrayRef") unless ref $_[0] eq "ARRAY"; return @_ unless $#_ >= 1; Hydrogen::croak("Type check failed in signature for join: %s should be %s", "\$_[1]", "Optional[Str]") unless do { if (defined $_[1]) { ref \(my $val = $_[1]) eq "SCALAR" unless ref \$_[1] eq "SCALAR"; } }; @_; }
1026 0 1 0 $__signature ||= sub { my(%tmp, $tmp); Hydrogen::croak("Wrong number of parameters in signature for %s: got %d, %s", "natatime", scalar @_, "expected exactly 2 parameters") unless @_ >= 2 and @_ <= 3; Hydrogen::croak("Type check failed in signature for natatime: %s should be %s", "\$_[0]", "ArrayRef") unless ref $_[0] eq "ARRAY"; Hydrogen::croak("Type check failed in signature for natatime: %s should be %s", "\$_[1]", "Int") unless do { my $tmp = $_[1]; $tmp =~ /\A-?[0-9]+\z/ if defined $tmp and not ref $tmp }; return @_ unless $#_ >= 2; Hydrogen::croak("Type check failed in signature for natatime: %s should be %s", "\$_[2]", "Optional[CodeRef]") unless ref $_[2] eq "CODE"; @_; }
1283 0 0 0 $__signature ||= sub { my(%tmp, $tmp); Hydrogen::croak("Wrong number of parameters in signature for %s: got %d, %s", "pick_random", scalar @_, "expected exactly 1 parameters") unless @_ >= 1 and @_ <= 2; Hydrogen::croak("Type check failed in signature for pick_random: %s should be %s", "\$_[0]", "ArrayRef") unless ref $_[0] eq "ARRAY"; return @_ unless $#_ >= 1; Hydrogen::croak("Type check failed in signature for pick_random: %s should be %s", "\$_[1]", "Optional[Int]") unless do { my $tmp = $_[1]; $tmp =~ /\A-?[0-9]+\z/ if defined $tmp and not ref $tmp }; @_; }
1374 0 0 0 $__signature ||= sub { my(%tmp, $tmp); Hydrogen::croak("Wrong number of parameters in signature for %s: got %d, %s", "print", scalar @_, "expected exactly 1 parameters") unless @_ >= 1 and @_ <= 3; Hydrogen::croak("Type check failed in signature for print: %s should be %s", "\$_[0]", "ArrayRef") unless ref $_[0] eq "ARRAY"; return @_ unless $#_ >= 1; Hydrogen::croak("Type check failed in signature for print: %s should be %s", "\$_[1]", "Optional[FileHandle]") unless do { builtin::blessed($_[1]) and $_[1]->isa("IO::Handle") unless ref $_[1] and &Scalar::Util::openhandle($_[1]) }; return @_ unless $#_ >= 2; Hydrogen::croak("Type check failed in signature for print: %s should be %s", "\$_[2]", "Optional[Str]") unless do { if (defined $_[2]) { ref \(my $val = $_[2]) eq "SCALAR" unless ref \$_[2] eq "SCALAR"; } }; @_; }
1729 0 0 0 $__signature ||= sub { my(%tmp, $tmp); Hydrogen::croak("Wrong number of parameters in signature for %s: got %d, %s", "sort", scalar @_, "expected exactly 1 parameters") unless @_ >= 1 and @_ <= 2; Hydrogen::croak("Type check failed in signature for sort: %s should be %s", "\$_[0]", "ArrayRef") unless ref $_[0] eq "ARRAY"; return @_ unless $#_ >= 1; Hydrogen::croak("Type check failed in signature for sort: %s should be %s", "\$_[1]", "Optional[CodeRef]") unless ref $_[1] eq "CODE"; @_; }
1778 0 0 0 $__signature ||= sub { my(%tmp, $tmp); Hydrogen::croak("Wrong number of parameters in signature for %s: got %d, %s", "sort_in_place", scalar @_, "expected exactly 1 parameters") unless @_ >= 1 and @_ <= 2; Hydrogen::croak("Type check failed in signature for sort_in_place: %s should be %s", "\$_[0]", "ArrayRef") unless ref $_[0] eq "ARRAY"; return @_ unless $#_ >= 1; Hydrogen::croak("Type check failed in signature for sort_in_place: %s should be %s", "\$_[1]", "Optional[CodeRef]") unless ref $_[1] eq "CODE"; @_; }