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
100 0 0 if ($self->{'db'})
105 0 0 if ($stop_here == 1) { }
117 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) { }
143 0 0 if ($self->{'response'}) { }
146 0 0 if ($content =~ /^(ERROR|Execution failed)/ and $self->{'response'}->status eq '200')
149 0 0 if ($content_filename and not $content_type =~ /^image/)
158 0 0 if ($stop_here == 1)
160 0 0 if $error_id
161 0 0 if $self->{'db'}
178 1 0 if (not $args->{'include_path'}) { }
0 0 elsif (not $args->{'include_path'} =~ m[/$]) { }
200 0 1 if ($args->{'template_file'}) { }
1 0 elsif ($args->{'template_text'}) { }
212 0 1 if $tt_error
215 0 1 if ($args->{'send_out'}) { }
0 1 elsif ($args->{'save_file'}) { }
236 0 0 unless $log_message
256 0 0 if ($log_directory and -d $log_directory) { }
266 0 0 if (ref $log_message eq 'HASH' or ref $log_message eq 'ARRAY')
271 0 0 if ($self->{'request'})
295 0 1 if ($time_string =~ /^\d{4}-\d{2}-\d{2}$/)
300 1 0 if ($time_string =~ /\s\d{2}:\d{2}$/)
305 0 1 if (not $time_string =~ /^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/) { }
335 0 1 if ($@)
362 0 0 unless $file_location
365 0 0 unless $operation and $operation =~ /read|write|append|basename/
368 0 0 unless $operation =~ /read|basename/ or $content
371 0 0 if ($operation eq 'read') { }
0 0 elsif ($operation eq 'write') { }
0 0 elsif ($operation eq 'append') { }
0 0 elsif ($operation eq 'basename') { }
383 0 0 unless $content =~ /\n$/
427 0 0 if ($numbers_only) { }
446 0 0 unless $json_file_path and -e $json_file_path
450 0 0 unless $json_content
460 0 0 unless $json_file_path and ref($data_structure) =~ /ARRAY|HASH/
475 1 0 if not $time_zone_name or $time_zone_name eq 'utc'
485 0 1 if (not $timestamp) { }
0 1 elsif ($timestamp =~ /\,/) { }
490 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/) { }
505 0 0 if $day < 10
513 1 0 if ($month or $timestamp =~ /-/)
523 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') { }
531 0 0 if ($diff > -1 and $diff < 1) { }
542 0 0 if ($diff > -1 and $diff < 1) { }
555 0 0 if ($diff >= -1 and $diff <= 1) { }
573 0 1 if ($time_zone_name ne 'Etc/GMT')
575 0 0 unless ($self->{'tz_offsets'}{$time_zone_name})
603 0 0 unless (-e $self->{'config_file'})
615 0 0 if ($@ or ref $self->{'config'} ne 'HASH')
641 0 0 unless ($endpoint_uri and $endpoint_handler)
646 0 0 if ($self->{'config'}{'url_mappings_table'}) { }
656 0 0 unless ($table_exists)
664 0 0 unless ($database_exists)
702 0 0 unless ($endpoint_uri)
707 0 0 if ($self->{'config'}{'url_mappings_table'}) { }