Condition Coverage

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


and 3 conditions

line !l l&&!r l&&r condition
112 0 0 2 @_ >= 2 and @_ <= 3
128 0 0 2 defined $tmp and not ref $tmp
347 0 0 0 defined $tmp and not ref $tmp
488 0 0 2 @_ >= 1 and @_ <= 2
506 0 0 1 defined $tmp and not ref $tmp
521 2 1 1 defined $d && $d < 0
643 0 0 3 defined $tmp and not ref $tmp
722 0 0 0 defined $tmp and not ref $tmp
767 0 0 1 defined $tmp and not ref $tmp
817 0 0 2 @_ >= 1 and @_ <= 2
970 0 0 1 @_ >= 2 and @_ <= 3
986 0 0 1 defined $tmp and not ref $tmp
1234 0 0 0 @_ >= 1 and @_ <= 2
1252 0 0 0 defined $tmp and not ref $tmp
1267 0 0 0 wantarray and @_ - 1
1308 0 0 0 @_ >= 1 and @_ <= 3
1327 0 0 0 &Scalar::Util::blessed($_[1]) and $_[1]->isa("IO::Handle")
0 0 0 ref $_[1] and &Scalar::Util::openhandle($_[1])
1541 0 0 0 defined $tmp and not ref $tmp
1583 0 0 1 defined $tmp and not ref $tmp
1687 0 0 0 @_ >= 1 and @_ <= 2
1734 0 0 0 @_ >= 1 and @_ <= 2
1786 0 0 0 defined $tmp and not ref $tmp
1801 0 0 0 defined $tmp and not ref $tmp
1860 0 0 0 defined $tmp and not ref $tmp

or 2 conditions

line l !l condition
146 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; '???'; @_; }
515 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 }; @_; }
844 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"; } }; @_; }
1004 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"; @_; }
1261 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 }; @_; }
1352 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"; } }; @_; }
1707 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"; @_; }
1756 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"; @_; }