Branch Coverage

blib/lib/WebShortcutUtil/Read.pm
Criterion Covered Total %
branch 64 68 94.1


line true false branch
161 1 116 unless (exists $_shortcut_file_readers{lc $suffix})
195 432 2 if ($line =~ /^\s*([A-Za-z0-9-]*)(\[([^\[\]]*)\])?\s*=\s*([^\n\r]*?)\s*$/) { }
227 2 84 unless (-e $filename)
254 0 31 unless open my $file, '<:encoding(UTF-8)', $filename
273 0 53 unless open my $file, '<', $filename
297 1 29 unless open my $file, '<', $filename
338 1 36 if (not $next_line) { }
29 7 elsif (_is_group_header($next_line, '(KDE )?Desktop Entry')) { }
6 1 elsif (_desktop_entry_is_blank_or_comment_line($next_line)) { }
353 2 29 unless ($desktop_entry_found)
361 28 149 if (not $next_line) { }
1 148 elsif (_is_group_header($next_line, '.*')) { }
9 139 elsif (_desktop_entry_is_blank_or_comment_line($next_line)) { }
369 138 1 if (defined $key) { }
370 28 110 if ($key eq 'Type') { }
27 83 elsif ($key eq 'URL') { }
382 1 28 if (not defined $type) { }
1 27 elsif ($type ne 'Link') { }
388 2 27 unless (defined $url)
417 53 452 if (not $next_line) { }
52 400 elsif (_is_group_header($next_line, 'InternetShortcut')) { }
6 394 elsif (_is_group_header($next_line, 'InternetShortcut.W')) { }
96 298 elsif (_is_group_header($next_line, '.*')) { }
3 295 elsif (_url_is_blank_or_comment_line($next_line)) { }
430 294 1 if (defined $key) { }
431 62 232 if ($key eq 'URL')
432 51 11 if ($curr_section == 1) { }
6 5 elsif ($curr_section == 2) { }
445 6 47 if (defined $parsed_urlw) { }
46 1 elsif (defined $parsed_url) { }
465 0 29 unless eval "use $module $list; 1"
479 1 28 if (ref $data ne 'Mac::PropertyList::dict') { }
1 27 elsif (not exists $$data{'URL'}) { }
506 0 4 unless (exists $_shortcut_handle_readers{lc $suffix})