Branch Coverage

blib/lib/Catalyst/Helper.pm
Criterion Covered Total %
branch 16 108 14.8


line true false branch
39 0 3 if (exists $ENV{'CATALYST_DEVEL_SHAREDIR'}) { }
0 3 elsif (-d 'inc/.author' and -f 'lib/Catalyst/Helper.pm') { }
51 1 2 unless -r $file
59 1 2 unless ($cache{$class})
64 0 3 unless $data
70 3 1 if $name eq $file
82 0 0 if ($name eq '.')
83 0 0 unless (-e 'META.yml')
84 0 0 if system 'perl', 'Makefile.PL'
95 0 0 if ($name =~ /[^\w:]/ or $name =~ /^\d/ or $name =~ /\b:\b|:{3,}/)
101 0 0 unless (defined $self->{'dir'})
110 0 0 -r '/usr/bin/env' ? :
119 0 0 $self->{'makefile'} ? :
120 0 0 $self->{'scripts'} ? :
121 0 0 $self->{'scripts'} || $self->{'makefile'} ? :
123 0 0 if ($gen_app)
130 0 0 if ($gen_makefile)
133 0 0 if ($gen_scripts)
153 0 0 if ($_[0] =~ /^(?:model|view|controller)$/i) { }
159 0 0 if ($@)
164 0 0 if ($class->can('mk_stuff'))
165 0 0 unless $class->mk_stuff($self, @args)
173 0 0 if $name =~ /[^\w\:]/
176 0 0 if $type =~ /model/i
177 0 0 if $type =~ /view/i
178 0 0 if $type =~ /controller/i
182 0 0 unless -d $test_path
191 0 0 if ($name =~ /\:/)
205 0 0 if ($helper) { }
210 0 0 if ($@)
215 0 0 if ($class->can('mk_compclass')) { }
216 0 0 unless $class->mk_compclass($self, @args)
219 0 0 unless $self->_mk_compclass
222 0 0 if ($class->can('mk_comptest')) { }
232 0 0 unless $self->_mk_compclass
241 0 0 if (-d $dir)
245 0 0 if (mkpath([$dir]))
255 0 3 if (-e $file and -s _)
260 0 0 unless $self->{'.newfiles'} or $self->{'scripts'} or $self->{'makefile'}
261 0 0 if ($self->{'.newfiles'})
262 0 0 if (my $f = 'IO::File'->new("< $file"))
264 0 0 if $content eq $oldcontent
270 3 0 if (my $f = 'IO::File'->new("> $file"))
282 0 0 if ($tname) { }
313 0 1 unless $template
321 0 3 unless $template
323 0 3 unless $t->process(\$template, {%{$self;}, %$vars}, \$output)
327 1 2 if defined $perms
355 0 0 if ($self->{'short'}) { }
373 0 0 $self->{'short'} ? :
396 0 0 if ($self->{'makefile'})
527 0 0 if (-e $file)
529 0 0 if ($f = 'IO::File'->new("< $file"))
533 0 0 if ($f = 'IO::File'->new("> $newfile"))