| line |
true |
false |
branch |
|
71
|
0 |
0 |
if (-d $OLD_DEFAULT_DATA) |
|
75
|
0 |
0 |
if (exists $ENV{'XDG_DATA_HOME'} and -d $ENV{'XDG_DATA_HOME'}) |
|
79
|
0 |
0 |
if (-d $DOT_LOCAL) |
|
95
|
0 |
0 |
if (fc $in eq 'y') { } |
|
|
0 |
0 |
elsif ($in eq '' or fc $in eq 'n') { } |
|
116
|
0 |
0 |
if ($in eq '' or fc $in eq 'n') { } |
|
|
0 |
0 |
elsif ($in =~ /^\d+$/u and exists $n{$in}) { } |
|
133
|
1 |
1 |
if ($title =~ m[^/(.*)/$]u) { } |
|
148
|
1 |
2 |
if ($targ =~ /^\d+$/u) { } |
|
195
|
0 |
0 |
if (-f $self->{'GetFile'}) { } |
|
200
|
0 |
0 |
unless open $fh, ">", $self->{'GetFile'} and close $fh |
|
224
|
3 |
4 |
if (@{$self->{'Args'};}) |
|
229
|
1 |
6 |
if (@{$self->{'Authors'};}) |
|
233
|
1 |
6 |
if (@{$self->{'Subjects'};}) |
|
237
|
1 |
6 |
if (defined $self->{'Language'}) |
|
241
|
1 |
6 |
if (@{$self->{'Shelves'};}) |
|
260
|
2 |
5 |
if (defined $params{'title'}) |
|
264
|
1 |
6 |
if (defined $params{'id'}) |
|
272
|
1 |
6 |
if (defined $params{'authors'} and @{$params{'authors'};}) |
|
284
|
1 |
6 |
if (defined $params{'subjects'} and @{$params{'subjects'};}) |
|
296
|
1 |
6 |
if (defined $params{'shelves'} and @{$params{'shelves'};}) |
|
307
|
1 |
6 |
if (defined $params{'language'}) |
|
366
|
0 |
0 |
if $rv == 1 or $rv == 7 |
|
372
|
0 |
0 |
if ($rv == 3) { } |
|
|
0 |
0 |
elsif ($rv == 0) { } |
|
376
|
0 |
0 |
if $rv != 0 |
|
379
|
0 |
0 |
unless $self->_get_ok |
|
382
|
0 |
0 |
if ($@ ne "") |
|
391
|
0 |
0 |
unless (-s $self->{'Catalog'}) |
|
403
|
0 |
0 |
if ($ltitl ne "") |
|
407
|
0 |
0 |
if ($lauth ne "") |
|
411
|
0 |
0 |
if ($lsubj ne "") |
|
415
|
0 |
0 |
if ($llang ne "") |
|
419
|
0 |
0 |
if ($lshlf ne "") |
|
423
|
0 |
0 |
if ($lebid ne "") |
|
424
|
0 |
0 |
unless ($lebid =~ /^\d+$/u) |
|
433
|
0 |
0 |
unless (%param) |
|
442
|
0 |
0 |
if (@books > $ARG_MAX) { } |
|
|
0 |
0 |
elsif (@books == 0) { } |
|
480
|
0 |
0 |
if $rv == 1 or $rv == 7 |
|
510
|
0 |
0 |
if ($rv == 0) { } |
|
|
0 |
0 |
elsif ($rv == 3) { } |
|
|
0 |
0 |
elsif ($rv == 1 or $rv == 7) { } |
|
546
|
0 |
0 |
if $rv == 1 or $rv == 7 |
|
570
|
0 |
0 |
if $rv == 1 or $rv == 7 |
|
575
|
0 |
0 |
unless $self->_get_ok |
|
583
|
0 |
0 |
if ($@ ne "") |
|
616
|
0 |
0 |
unless $self->_get_ok |
|
624
|
0 |
0 |
if ($@ ne "") |
|
650
|
0 |
0 |
if defined $exit |
|
662
|
0 |
0 |
unless ($self->_get_ok) |
|
667
|
0 |
0 |
unless ($self->{'Quiet'}) |
|
675
|
0 |
0 |
unless ($self->{'Quiet'}) |
|
687
|
0 |
7 |
unless (-f $self->{'Catalog'}) |
|
694
|
0 |
7 |
unless (%search) |
|
700
|
0 |
7 |
if (@books == 0) { } |
|
714
|
0 |
0 |
unless (-f $self->{'Catalog'}) |
|
719
|
0 |
0 |
unless ($self->_get_ok) |
|
726
|
0 |
0 |
unless (%search) |
|
734
|
0 |
0 |
if (@books == 0) { } |
|
|
0 |
0 |
elsif (@books == 1 or $self->{'NoPrompt'}) { } |
|
744
|
0 |
0 |
if (@books >= 100 and not $self->{'Quiet'}) |
|
750
|
0 |
0 |
unless (defined $n) |
|
751
|
0 |
0 |
unless $self->{'Quiet'} |
|
759
|
0 |
0 |
unless ($sel->{'Type'} eq "Text") |
|
763
|
0 |
0 |
$self->{'NoPrompt'} ? : |
|
768
|
0 |
0 |
unless ($ok) |
|
769
|
0 |
0 |
unless $self->{'Quiet'} |
|
775
|
0 |
0 |
unless ($self->{'Quiet'}) |
|
789
|
0 |
0 |
unless ($self->{'Quiet'}) |
|
801
|
0 |
40 |
unless (-f $self->{'Catalog'}) |
|
806
|
0 |
40 |
unless my $id = shift @{$$self{"Args"};} |
|
809
|
0 |
40 |
unless ($id =~ /^\d+$/u) |
|
817
|
0 |
40 |
unless (defined $book) |
|
821
|
20 |
20 |
if ($self->{'MetaJSON'}) { } |
|
888
|
0 |
47 |
unless &GetOptions("data|d=s", \$self->{'Data'}, "to|t=s", \$self->{'To'}, "format|f=s", \$self->{'Format'}, "author|a=s", $self->{'Authors'}, "subject|s=s", $self->{'Subjects'}, "language|l=s", \$self->{'Language'}, "shelf|H=s", $self->{'Shelves'}, "no-prompt|y", \$self->{'NoPrompt'}, "quiet|q", \$self->{'Quiet'}, "json|j", \$self->{'MetaJSON'}, "help|h", sub {
$self->help(0);
}
, "version|v", sub {
print $VER_MSG;
exit 0;
}
) |
|
890
|
0 |
47 |
unless $self->{'Command'} = shift @ARGV |
|
893
|
0 |
47 |
unless (exists $COMMANDS{$self->{'Command'}}) |
|
899
|
0 |
47 |
unless (-d $self->{'Data'}) |
|
916
|
0 |
47 |
unless (exists $EBook::Gutenberg::Get::FORMATS{$self->{'Format'}}) |
|
920
|
1 |
46 |
if (defined $self->{'Language'}) |
|
921
|
0 |
1 |
unless (length $self->{'Language'} == 2) |
|
948
|
0 |
0 |
if -e $f |