Branch Coverage

blib/lib/Crypt/ECB.pm
Criterion Covered Total %
branch 101 110 91.8


line true false branch
50 1868 11 if ($_[0])
55 6 1862 if ($_[0] =~ /^-[a-zA-Z]+$/) { }
1 1861 elsif (ref $_[0] eq 'HASH') { }
86 1 1880 if $_[1]
87 1 1871 if $_[1]
97 1875 7 if (my $key = shift())
116 1916 1868 if (my $padding = shift())
119 2 1914 if (ref $padding eq 'CODE')
130 1 24 unless length $padded == $bs
134 0 24 unless $trunc eq $plain
153 2144 8 if (my $cipher = shift())
158 1 2143 if (ref $cipher) { }
172 0 2143 $cipher =~ /^Crypt/ ? :
175 265 1878 if $@
187 0 1879 unless ($module->can('blocksize'))
189 0 1879 unless $module->can('blocksize') and $module->blocksize
199 1879 0 $module->can('keysize') ? :
224 1 3790 if $self->{'_buffer'}
226 1 3789 unless $mode =~ /^[de]/i
230 1873 1916 unless ($self->{'_cipherobj'})
235 1 1872 unless $self->{'key'}
241 1 1871 unless $self->{'module'}
247 1435 2352 $mode =~ /^d/i ? :
261 51 3797 unless defined $data
266 1 3847 unless $mode
296 1 3787 unless $mode
304 40 3747 unless defined $data
311 1420 2327 if ($mode =~ /^d/i) { }
324 2245 82 if (length $data < $bs) { }
333 49 33 if $self->_pad('')
362 2 1 $padding eq 'none' ? :
1 3 ref $padding eq 'CODE' ? :
464 4 $padding eq 'space' ? :
4 468 $padding eq 'null' ? :
463 472 $padding eq 'rijndael_compat' ? :
479 935 $padding eq 'oneandzeroes' ? :
479 1414 $padding eq 'zeroes' ? :
483 1893 $padding eq 'standard' ? :
388 561 859 if ($padding =~ /^(standard|zeroes|random)$/) { }
392 1 560 if $trunc > $bs
395 0 0 $padding eq 'random' ? :
280 0 $padding eq 'zeroes' ? :
280 280 $padding eq 'standard' ? :
399 1 559 unless $expected eq substr($data, -$trunc)
405 17 1 $padding eq 'none' ? :
1 18 ref $padding eq 'CODE' ? :
279 19 $padding eq 'space' ? :
3 298 $padding eq 'null' ? :
279 301 $padding eq 'rijndael_compat' ? :
279 580 $padding eq 'oneandzeroes' ? :
431 1924 1860 if (ref $_[1]) { }
440 1860 0 if $padding
442 20 1840 unless length $data
462 931 465 if (ref $_[0]) { }
478 468 465 if (ref $_[0]) { }