Branch Coverage

blib/lib/Catalyst/Controller/AutoAssets/Handler.pm
Criterion Covered Total %
branch 39 70 55.7


line true false branch
131 4 14 if $self->is_current_request_arg(@args)
135 0 14 if $self->allow_static_requests and $self->static_alias eq $sha1
145 2 3 $arg eq $self->current_alias ? :
176 0 14 if ($self->use_etags and $self->client_current_etag($c, $arg, @args)) { }
192 0 0 $client_etag && $client_etag eq $etag ? :
272 12 6 if ($inc->is_dir) { }
278 27 14 $self->_valid_include_file($child) ? :
285 6 0 $self->_valid_include_file($inc) ? :
318 14 33 $file->is_dir || $self->include_regex && !($file =~ $self->_include_regexp) || $self->exclude_regex && $file =~ $self->_exclude_regexp ? :
329 29 8 -f $self->built_file ? :
347 8 0 if $sha1
353 4 22 unless -f $self->fingerprint_file
360 0 4 unless my $fingerprint = shift()
366 0 4 unless my $fingerprint = $self->calculate_fingerprint(@_)
372 0 25 unless my $last = $self->last_fingerprint_calculated
373 25 0 if $self->max_fingerprint_calc_age == 0
374 0 0 if time - $last < $self->max_fingerprint_calc_age
393 4 0 unless $self->persist_state
403 0 0 unless -f $self->persist_state_file
407 0 0 if ($self->_valid_state_data($data))
427 0 0 $self->_module_version eq $data->{'_module_version'} && Dumper($self->_build_params) eq Dumper($data->{'_build_params'}) ? :
445 25 4 $self->inc_mtimes && $self->built_mtime && $d->{'inc_mtimes'} && $d->{'built_mtime'} && $self->inc_mtimes eq $d->{'inc_mtimes'} && $self->built_mtime eq $d->{'built_mtime'} && $self->fingerprint_calc_current ? :
475 25 4 unless $self->_build_required($opt)
498 0 4 if $self->_app->debug
519 0 4 if ($fingerprint and $cur_fingerprint and $cur_fingerprint eq $fingerprint)
531 0 4 unless my $fd = $self->built_file->openw
534 3 1 if $fd->opened
548 0 8 ref $_[0] eq 'ARRAY' ? :
552 0 22 unless my $fh = $file->openr
595 0 4 unless sysopen $fh, $fname, 194, 420 or sysopen $fh, $fname, 2
600 0 4 unless &try(sub { fcntl $fh, 2, 1; } )
607 4 0 if flock $fh, 6
608 0 0 if &Time::HiRes::time() >= $deadline
614 0 4 unless syswrite $fh, $data, length $data
615 0 4 unless truncate $fh, length $data