Branch Coverage

blib/lib/Pepper/Utilities.pm
Criterion Covered Total %
branch 31 192 16.1


line true false branch
41 0 1 unless $args->{'skip_config'}
61 0 0 if ($stop_here == 1 or $stop_here == 3)
68 0 0 if $content =~ /^Access\:/
70 0 0 if (length $content)
76 0 0 if ($self->{'config'}{'development_server'} eq 'Y' or $content =~ /^No application exists/) { }
79 0 0 unless $display_error_message =~ /(\.|\?|\!)$/
86 0 0 if ($self->{'auth_token'}) { }
0 0 elsif ($self->{'request'}) { }
94 0 0 if $display_error_message
101 0 0 if ($self->{'db'})
106 0 0 if ($stop_here == 1) { }
118 0 0 if ($content_type and $content_type =~ m[/]) { }
0 0 elsif ($ref_type eq 'HASH' or $ref_type eq 'ARRAY') { }
0 0 elsif ($content =~ m[^// This is Javascript.]) { }
0 0 elsif ($content =~ m[^/\* This is CSS.]) { }
0 0 elsif ($content =~ /<\S+>/) { }
0 0 elsif (not $ref_type and length $content) { }
144 0 0 if ($self->{'response'}) { }
147 0 0 if ($content =~ /^(ERROR|Execution failed)/ and $self->{'response'}->status eq '200')
150 0 0 if ($content_filename and not $content_type =~ /^image/)
159 0 0 if ($stop_here == 1)
161 0 0 if $error_id
162 0 0 if $self->{'db'}
179 1 0 if (not $args->{'include_path'}) { }
0 0 elsif (not $args->{'include_path'} =~ m[/$]) { }
201 0 1 if ($args->{'template_file'}) { }
1 0 elsif ($args->{'template_text'}) { }
213 0 1 if $tt_error
216 0 1 if ($args->{'send_out'}) { }
0 1 elsif ($args->{'save_file'}) { }
237 0 0 unless $log_message
257 0 0 if ($log_directory and -d $log_directory) { }
267 0 0 if (ref $log_message eq 'HASH' or ref $log_message eq 'ARRAY')
272 0 0 if ($self->{'request'})
296 0 1 if ($time_string =~ /^\d{4}-\d{2}-\d{2}$/)
301 1 0 if ($time_string =~ /\s\d{2}:\d{2}$/)
306 0 1 if (not $time_string =~ /^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/) { }
336 0 1 if ($@)
363 0 0 unless $file_location
366 0 0 unless $operation and $operation =~ /read|write|append|basename/
369 0 0 unless $operation =~ /read|basename/ or $content
372 0 0 if ($operation eq 'read') { }
0 0 elsif ($operation eq 'write') { }
0 0 elsif ($operation eq 'append') { }
0 0 elsif ($operation eq 'basename') { }
384 0 0 unless $content =~ /\n$/
428 0 0 if ($numbers_only) { }
447 0 0 unless $json_file_path and -e $json_file_path
451 0 0 unless $json_content
461 0 0 unless $json_file_path and ref($data_structure) =~ /ARRAY|HASH/
476 1 0 if not $time_zone_name or $time_zone_name eq 'utc'
486 0 1 if (not $timestamp) { }
0 1 elsif ($timestamp =~ /\,/) { }
491 0 0 if ($month =~ /Jan/) { }
0 0 elsif ($month =~ /Feb/) { }
0 0 elsif ($month =~ /Mar/) { }
0 0 elsif ($month =~ /Apr/) { }
0 0 elsif ($month =~ /May/) { }
0 0 elsif ($month =~ /Jun/) { }
0 0 elsif ($month =~ /Jul/) { }
0 0 elsif ($month =~ /Aug/) { }
0 0 elsif ($month =~ /Sep/) { }
0 0 elsif ($month =~ /Oct/) { }
0 0 elsif ($month =~ /Nov/) { }
0 0 elsif ($month =~ /Dec/) { }
506 0 0 if $day < 10
514 1 0 if ($month or $timestamp =~ /-/)
524 0 1 if ($task eq 'to_unix_start') { }
0 1 elsif ($task eq 'to_unix_end') { }
0 1 elsif ($task eq 'to_date_db') { }
0 1 elsif (not $task or $task eq 'to_date_human') { }
0 1 elsif ($task eq 'to_date_human_full') { }
0 1 elsif ($task eq 'to_date_human_abbrev') { }
0 1 elsif ($task eq 'to_date_human_dayname') { }
0 1 elsif ($task eq 'to_year') { }
0 1 elsif ($task eq 'to_month' or $task eq 'to_month_name') { }
0 1 elsif ($task eq 'to_month_abbrev') { }
0 1 elsif ($task eq 'to_date_human_time') { }
0 1 elsif ($task eq 'to_just_human_time') { }
0 1 elsif ($task eq 'to_just_military_time') { }
0 1 elsif ($task eq 'to_datetime_iso') { }
1 0 elsif ($task eq 'to_day_of_week') { }
0 0 elsif ($task eq 'to_day_of_week_numeric') { }
532 0 0 if ($diff > -1 and $diff < 1) { }
543 0 0 if ($diff > -1 and $diff < 1) { }
556 0 0 if ($diff >= -1 and $diff <= 1) { }
574 0 1 if ($time_zone_name ne 'Etc/GMT')
576 0 0 unless ($self->{'tz_offsets'}{$time_zone_name})
604 0 0 unless (-e $self->{'config_file'})
616 0 0 if ($@ or ref $self->{'config'} ne 'HASH')
642 0 0 unless ($endpoint_uri and $endpoint_handler)
647 0 0 if ($self->{'config'}{'url_mappings_table'}) { }
657 0 0 unless ($table_exists)
665 0 0 unless ($database_exists)
703 0 0 unless ($endpoint_uri)
708 0 0 if ($self->{'config'}{'url_mappings_table'}) { }