Branch Coverage

blib/lib/Catalyst/Helper.pm
Criterion Covered Total %
branch 41 108 37.9


line true false branch
29 30 3 if (exists $ENV{'CATALYST_DEVEL_SHAREDIR'}) { }
0 3 elsif (-d 'inc/.author' and -f 'lib/Catalyst/Helper.pm') { }
41 1 32 unless -r $file
49 1 2 unless ($cache{$class})
54 0 3 unless $data
60 3 1 if $name eq $file
72 1 1 if ($name eq '.')
73 0 1 unless (-e 'META.yml')
74 0 0 if system 'perl', 'Makefile.PL'
85 0 2 if ($name =~ /[^\w:]/ or $name =~ /^\d/ or $name =~ /\b:\b|:{3,}/)
91 1 1 unless (defined $self->{'dir'})
100 2 0 -r '/usr/bin/env' ? :
109 0 2 $self->{'makefile'} ? :
110 1 1 $self->{'scripts'} ? :
111 1 1 $self->{'scripts'} || $self->{'makefile'} ? :
113 1 1 if ($gen_app)
120 1 1 if ($gen_makefile)
123 2 0 if ($gen_scripts)
143 0 0 if ($_[0] =~ /^(?:model|view|controller)$/i) { }
149 0 0 if ($@)
154 0 0 if ($class->can('mk_stuff'))
155 0 0 unless $class->mk_stuff($self, @args)
163 0 0 if $name =~ /[^\w\:]/
166 0 0 if $type =~ /model/i
167 0 0 if $type =~ /view/i
168 0 0 if $type =~ /controller/i
172 0 0 unless -d $test_path
181 0 0 if ($name =~ /\:/)
195 0 0 if ($helper) { }
200 0 0 if ($@)
205 0 0 if ($class->can('mk_compclass')) { }
206 0 0 unless $class->mk_compclass($self, @args)
209 0 0 unless $self->_mk_compclass
212 0 0 if ($class->can('mk_comptest')) { }
222 0 0 unless $self->_mk_compclass
231 0 11 if (-d $dir)
235 11 0 if (mkpath([$dir]))
245 5 28 if (-e $file and -s _)
250 0 0 unless $self->{'.newfiles'} or $self->{'scripts'} or $self->{'makefile'}
251 0 5 if ($self->{'.newfiles'})
252 0 0 if (my $f = 'IO::File'->new("< $file"))
254 0 0 if $content eq $oldcontent
260 33 0 if (my $f = 'IO::File'->new("> $file"))
272 0 0 if ($tname) { }
303 0 21 unless $template
311 0 23 unless $template
313 0 23 unless $t->process(\$template, {%{$self;}, %$vars}, \$output)
317 11 12 if defined $perms
345 0 1 if ($self->{'short'}) { }
363 0 1 $self->{'short'} ? :
386 0 1 if ($self->{'makefile'})
517 0 0 if (-e $file)
519 0 0 if ($f = 'IO::File'->new("< $file"))
523 0 0 if ($f = 'IO::File'->new("> $newfile"))