Branch Coverage

blib/lib/Test/StubGenerator.pm
Criterion Covered Total %
branch 52 64 81.2


line true false branch
27 11 1 ref $arg_ref eq 'HASH' ? :
38 1 11 if $$self{'out_dir'}
42 2 10 unless $code
46 0 10 unless $$self{'doc'} = 'PPI::Document'->new($code, 'readonly', 1)
56 17 5 if ($item_ref) { }
71 33 3777 if $_[1]->isa('PPI::Statement::Sub') and not $_[1]->isa('PPI::Statement::Scheduled')
88 7 3803 if $_[1]->isa('PPI::Statement::Package')
108 47 369 if ($statement->isa('PPI::Statement::Variable'))
123 14 33 if (scalar grep({$_->isa('PPI::Token::Magic');} $statement->children))
129 16 31 if (scalar grep({$_->content eq 'shift';} $statement->children))
160 16 2 unless (scalar grep({$_ eq $var;} @vars))
162 0 16 if ($var =~ /^\%/) { }
5 11 elsif ($var =~ /^\@/) { }
181 23 3 $package ? :
186 13 13 if @{$vars_ref;}
199 0 11 if ($$self{'tidy'})
211 7 6 if ($package) { }
217 2 5 if ($pkg_hierarchy > 0)
228 3 3 if $$self{'file'}
236 7 19 if ($package and defined $$self{'structure'}{'methods'}{$constructor})
253 7 6 if ($constructor_found)
255 7 0 if (scalar @methods)
267 2 9 if (defined $$self{'output'}) { }
268 1 1 if (ref $$self{'output'} eq 'GLOB') { }
1 0 elsif (defined $$self{'out_dir'} and -d $$self{'out_dir'}) { }
271 0 1 unless print {$$self{'output'};} $test_file
278 0 0 unless return $self->_write_file($test_file)
297 1 0 $$self{'structure'}{'package'} ? :
313 0 1 unless open my $test_fh, '>', "$$self{'out_dir'}/$filename"
315 0 1 unless print {$test_fh;} $test_file
316 0 1 unless close $test_fh
324 8 4 if $package