Condition Coverage

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


and 3 conditions

line !l l&&!r l&&r condition
115 0 0 2 @_ >= 2 and @_ <= 3
131 0 0 2 defined $tmp and not ref $tmp
350 0 0 0 defined $tmp and not ref $tmp
491 0 0 2 @_ >= 1 and @_ <= 2
509 0 0 1 defined $tmp and not ref $tmp
524 2 1 1 defined $d && $d < 0
650 0 0 3 defined $tmp and not ref $tmp
729 0 0 0 defined $tmp and not ref $tmp
791 0 0 1 defined $tmp and not ref $tmp
841 0 0 2 @_ >= 1 and @_ <= 2
994 0 0 1 @_ >= 2 and @_ <= 3
1010 0 0 1 defined $tmp and not ref $tmp
1258 0 0 0 @_ >= 1 and @_ <= 2
1276 0 0 0 defined $tmp and not ref $tmp
1291 0 0 0 wantarray and @_ - 1
1332 0 0 0 @_ >= 1 and @_ <= 3
1351 0 0 0 builtin::blessed($_[1]) and $_[1]->isa("IO::Handle")
0 0 0 ref $_[1] and &Scalar::Util::openhandle($_[1])
1565 0 0 0 defined $tmp and not ref $tmp
1607 0 0 1 defined $tmp and not ref $tmp
1711 0 0 0 @_ >= 1 and @_ <= 2
1758 0 0 0 @_ >= 1 and @_ <= 2
1809 0 0 0 defined $tmp and not ref $tmp
1824 0 0 0 defined $tmp and not ref $tmp
1883 0 0 0 defined $tmp and not ref $tmp

or 3 conditions

line l !l&&r !l&&!r condition
149 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; '???'; @_; }
518 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 }; @_; }
868 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"; } }; @_; }
1028 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"; @_; }
1285 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 }; @_; }
1376 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"; } }; @_; }
1731 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"; @_; }
1780 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"; @_; }