Branch Coverage

script/bookmarks
Criterion Covered Total %
branch 18 152 11.8


line true false branch
81 0 1 unless &getopts("hVdaf:s", \%options)
90 0 1 if $help
91 0 1 if $version
94 0 1 if (not @ARGV or $all)
98 0 0 if ($^O eq 'darwin') { }
0 0 elsif ($^O eq 'linux') { }
0 0 elsif ($^O eq 'MSWin32') { }
129 0 0 if defined $_
130 0 0 if defined $_
131 3 0 if defined $_
132 0 0 if defined $_
133 0 0 if defined $_
134 0 0 if defined $_
135 0 0 if defined $_
136 0 0 if defined $_
137 0 0 if defined $_
138 0 0 if defined $_
139 0 0 if defined $_
140 0 0 if defined $_
141 0 0 if defined $_
142 0 0 if defined $_
143 0 0 if defined $_
144 0 0 length $_ ? :
0 0 if defined $_
145 0 0 length $_ ? :
0 0 if defined $_
153 1 0 if ($dispatch{$format}) { }
170 0 0 if $debug
174 0 0 unless $res =~ /OK$/u
178 0 0 unless $text
189 0 0 if $bm =~ /"title" => "(.+)"/iu
190 0 0 if $bm =~ /"URLString" => "(.+)"/iu
191 0 0 if $bm =~ /"PreviewText" => "(.+)"/iu
203 0 0 if ($@)
209 0 0 if $debug
213 0 0 unless copy($dbfile, $dir)
218 0 0 unless my $dbh = "DBI"->connect("dbi:SQLite:dbname=$dbfile", "", "", {"RaiseError", 1, "PrintError", 0, "AutoCommit", 0})
248 0 0 if $debug
256 0 0 if ($sth)
265 0 0 if ($@)
280 0 0 if ($@)
286 0 0 if $debug
314 0 0 if ($@)
320 0 0 if $debug
362 0 0 if ($@)
368 0 0 if $debug
371 0 0 $schemeless ? :
378 0 0 if $schemeless
382 0 0 if ($file eq '-') { }
388 0 0 unless open $fh, "<:encoding(UTF-8)", $file
393 0 0 if ($line =~ /(?:(.*)\s)?($regex)(?:\s+(.*))?/u)
410 0 0 if ($@)
416 0 0 if $debug
419 0 0 $schemeless ? :
426 0 0 if $schemeless
429 0 0 unless open my $fh, "<:encoding(UTF-8)", $file
433 0 0 if ($line =~ /^=>\s+($regex)\s+(.*)/u)
447 0 1 if $debug
450 0 1 unless open my $fh, "<:encoding(UTF-8)", $file
456 1 1 if ($line =~ / (? # Text group, including square brackets \[ (?> # (?> defines an atomic group, this is a performance improvement when using recursion [^\[\]]+ # Look for any char except closing square bracket |(?&text_group) # OR: find recursively an other pattern with opening and closing square brackets )* \] ) (?: \( (?\S*?) # URL: non-greedy non-whitespace characters (?: [ ] " (? (?:[^"]|(?<=\\)")*? # Title without double quotes around ) " )? \) ) /ux) </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#498">498</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> if ($@) </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#504">504</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> if $debug </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#508">508</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> unless $netscape->isa("Netscape::Bookmarks::Category") </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#512">512</a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> if ($object->isa("Netscape::Bookmarks::Link")) </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#531">531</a> </td> <td class="c0"> 0 </td> <td class="c3"> 1 </td> <td class="s"> if ($format eq 'csv') { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c0"> 0 </td> <td class="c3"> 1 </td> <td class="s"> elsif ($format eq 'html') { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#551">551</a> </td> <td class="c0"> 0 </td> <td class="c3"> 1 </td> <td class="s"> if (-f $file and $name =~ /\.plist$/u) { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c0"> 0 </td> <td class="c3"> 1 </td> <td class="s"> elsif (-f $file and $name =~ /\.sqlite$/u) { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c0"> 0 </td> <td class="c3"> 1 </td> <td class="s"> elsif (-f $file and $name =~ /Bookmarks$/u) { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c0"> 0 </td> <td class="c3"> 1 </td> <td class="s"> elsif (-d $file and $name =~ /Favorites$/u) { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c3"> 1 </td> <td class="c0"> 0 </td> <td class="s"> elsif (-f $file and $name =~ /\.md$/u) { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> elsif (-f $file and $name =~ /\.gmi$/u) { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> elsif (-f $file and $name =~ /\.html$/u) { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> elsif (-f $file) { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#"></a> </td> <td class="c0"> 0 </td> <td class="c0"> 0 </td> <td class="s"> elsif ($file eq '-') { } </td> </tr> <a name=""> </a> <tr> <td class="h"> <a href="script-bookmarks.html#564">564</a> </td> <td class="c0"> 0 </td> <td class="c3"> 1 </td> <td class="s"> if ($format eq "html") </td> </tr> </table> </body> </html>