Branch Coverage

blib/lib/Crypt/Random/Seed.pm
Criterion Covered Total %
branch 37 106 34.9


line true false branch
38 0 15 if (defined $params{'Weak'})
43 0 15 if (defined $params{'Source'}) { }
44 0 0 if (ref $params{'Source'} eq 'CODE') { }
0 0 elsif (ref $params{'Source'} eq 'ARRAY') { }
54 0 0 if defined $defined_methods{$$self{'Name'}}
71 3 12 if (defined $params{'Only'})
72 1 2 unless ref $params{'Only'} eq 'ARRAY'
76 1 3 if $whitelist{$name}
80 2 12 if (defined $params{'Never'})
81 1 1 unless ref $params{'Never'} eq 'ARRAY'
84 0 2 if $blacklist{$name}
90 26 21 unless defined $name
91 0 10 if $isblocking and $params{'NonBlocking'} || $params{'Nonblocking'} || $params{'nonblocking'}
93 1 17 if $blacklist{$name}
94 5 12 if $have_whitelist and not $whitelist{$name}
103 1 12 unless defined $$self{'SourceSub'}
130 0 2 unless defined $nbytes and int $nbytes > 0
132 0 2 unless defined $rsub
137 5 2 unless defined $nvalues and int $nvalues > 0
139 0 2 unless defined $rsub
145 0 2 unless eval { do { require Crypt::Random::TESHA2; 'Crypt::Random::TESHA2'->import; 1 } }
148 2 0 $isstrong ? :
153 0 6 unless -r '/dev/urandom'
158 0 13 unless -r '/dev/random'
161 0 13 $^O eq 'freebsd' ? :
167 0 4 unless defined $nbytes and $nbytes > 0
174 0 4 unless defined $thisread and $thisread > 0
179 0 4 unless $nbytes == length $s
194 13 0 unless $^O eq 'MSWin32'
196 0 0 unless eval { do { require Win32; require Win32::API; require Win32::API::Type; 1 } }
206 0 0 if $major < 5
208 0 0 if ($major == 5 and $minor == 0) { }
213 0 0 unless defined $crypt_acquire_context_a
217 0 0 unless $result
222 0 0 unless defined $crypt_gen_random
228 0 0 unless $result
239 0 0 unless defined $rtlgenrand
245 0 0 unless $result
258 52 0 unless -r $device and -S $device
259 0 0 unless eval { do { require IO::Socket; 1 } }
264 0 0 unless $socket
265 0 0 unless $socket->syswrite("\000", 1)
266 0 0 if $socket->error
276 0 0 if ($@)
277 0 0 unless $@ eq "alarm\n"
280 0 0 unless defined $nread and $nread == 4
289 0 0 unless defined $device
290 0 0 unless defined $nbytes and int $nbytes > 0
291 0 0 unless -r $device and -S $device
293 0 0 unless $socket
296 0 0 $toread > 255 ? :
300 0 0 unless defined $this_grant and $this_grant == $this_request
305 0 0 unless $nbytes == length $s