Condition Coverage

blib/lib/Hydrogen/Array.pm
Criterion Covered Total %
condition 20 91 21.9


and 3 conditions

line !l l&&!r l&&r condition
114 0 0 2 @_ >= 2 and @_ <= 3
130 0 0 2 defined $tmp and not ref $tmp
349 0 0 0 defined $tmp and not ref $tmp
490 0 0 2 @_ >= 1 and @_ <= 2
508 0 0 1 defined $tmp and not ref $tmp
523 2 1 1 defined $d && $d < 0
645 0 0 3 defined $tmp and not ref $tmp
724 0 0 0 defined $tmp and not ref $tmp
769 0 0 1 defined $tmp and not ref $tmp
819 0 0 2 @_ >= 1 and @_ <= 2
972 0 0 1 @_ >= 2 and @_ <= 3
988 0 0 1 defined $tmp and not ref $tmp
1236 0 0 0 @_ >= 1 and @_ <= 2
1254 0 0 0 defined $tmp and not ref $tmp
1269 0 0 0 wantarray and @_ - 1
1310 0 0 0 @_ >= 1 and @_ <= 3
1329 0 0 0 &Scalar::Util::blessed($_[1]) and $_[1]->isa("IO::Handle")
0 0 0 ref $_[1] and &Scalar::Util::openhandle($_[1])
1543 0 0 0 defined $tmp and not ref $tmp
1585 0 0 1 defined $tmp and not ref $tmp
1689 0 0 0 @_ >= 1 and @_ <= 2
1736 0 0 0 @_ >= 1 and @_ <= 2
1787 0 0 0 defined $tmp and not ref $tmp
1802 0 0 0 defined $tmp and not ref $tmp
1861 0 0 0 defined $tmp and not ref $tmp

or 2 conditions

line l !l condition
148 1 1 $__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; '???'; @_; }
517 1 1 $__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 }; @_; }
846 1 1 $__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"; } }; @_; }
1006 0 1 $__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"; @_; }
1263 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 }; @_; }
1354 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 { &Scalar::Util::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"; } }; @_; }
1709 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"; @_; }
1758 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"; @_; }