line |
true |
false |
branch |
112
|
83 |
0 |
unless ($self->agent) |
126
|
82 |
1 |
exists $args{'warnings'} ? : |
|
0 |
84 |
exists $args{'watchfiles'} ? : |
135
|
81 |
64 |
if $self->option("dumprequests") |
137
|
1 |
143 |
if $self->option("dumpresponses") |
142
|
1 |
0 |
unless $_[1] |
148
|
83 |
0 |
if $self->agent->can("env_proxy") |
155
|
80 |
3 |
if (exists $args{'rcfile'}) { } |
158
|
0 |
3 |
$^O =~ /win32/i ? : |
159
|
0 |
3 |
if -f "$userhome/.mechanizerc" |
162
|
1 |
82 |
if exists $args{'cookiefile'} |
163
|
1 |
82 |
if defined $sourcefile |
168
|
83 |
0 |
if ($self->option("watchfiles")) |
170
|
18245 |
0 |
if -f $_ and -r $_ |
175
|
83 |
0 |
if $@ |
210
|
2 |
1 |
unless open F, "< $filename" |
215
|
0 |
2 |
if $self->{'options'}{'verbose'} |
235
|
1 |
85 |
if $self->option("warnings") |
250
|
0 |
32 |
if ($ENV{'PAGER'} and -t STDOUT) { } |
257
|
0 |
0 |
if ($^O eq 'VMS') { } |
258
|
0 |
0 |
if system("$pager $filename") == 0 |
260
|
0 |
0 |
if system(qq[$pager "$filename"]) == 0 |
263
|
0 |
0 |
unless unlink $filename |
274
|
667 |
3 |
if (exists $self->{'options'}{$option}) { } |
276
|
73 |
594 |
if (scalar @_ == 3) |
287
|
0 |
0 |
if ($0 ne "-e") |
296
|
0 |
338 |
if ($self->{'files'} and $self->{'files'}->changed) |
298
|
0 |
0 |
if $self->option("autorestart") |
314
|
2 |
0 |
unless $self->agent->res |
324
|
0 |
0 |
if $token->is_start_tag |
336
|
0 |
1 |
if ($self->agent->response) { } |
345
|
1 |
0 |
if (ref $_[1] eq 'ARRAY') { } |
354
|
11 |
51 |
if ($arg =~ m[^/(.*)/([imsx]*)$]) |
377
|
2 |
0 |
if $result = $link->$_ |
449
|
4 |
32 |
if (defined $filename) { } |
451
|
0 |
4 |
unless open my $f, ">", $filename |
457
|
0 |
4 |
if $@ |
468
|
13 |
1 |
if ($command =~ /^\s*#/) { } |
491
|
1 |
0 |
if ($@) |
513
|
0 |
0 |
if ($@) |
549
|
71 |
1 |
if $_[0]->agent->forms and scalar @{$_[0]->agent->forms;} |
569
|
2 |
57 |
if ($@) { } |
570
|
2 |
0 |
if $@ |
578
|
7 |
51 |
if $self->option("autosync") |
599
|
1 |
2 |
unless (defined $user_link) |
612
|
2 |
0 |
if (ref $user_link) { } |
615
|
3 |
17 |
defined $_->text && $_->text =~ /$re/ || defined $_->url && $_->url =~ /$re/ ? : |
616
|
1 |
1 |
if (@links == 0) |
626
|
1 |
1 |
if (@links) |
653
|
0 |
3 |
if $@ |
675
|
2 |
30 |
if ($filename) { } |
698
|
2 |
3 |
if (not defined $title) { } |
|
1 |
2 |
elsif ($title eq '') { } |
729
|
40 |
286 |
if ($token->is_start_tag($wanted)) |
734
|
40 |
0 |
if $tag =~ /(\d)/ |
745
|
37 |
3 |
if ($token and $token->is_text) |
747
|
8 |
29 |
unless ($text =~ /\S/) |
785
|
2 |
0 |
if (scalar @_ == 2) { } |
861
|
0 |
1 |
if (@forms) { } |
885
|
1 |
3 |
unless ($self->agent->current_form) |
890
|
3 |
0 |
if ($name) { } |
893
|
2 |
1 |
if ($name =~ /^\d+$/) { } |
904
|
0 |
3 |
if $@ |
909
|
0 |
0 |
if (@forms) { } |
929
|
0 |
1 |
if ($form) { } |
932
|
0 |
1 |
if $self->option("warnings") |
987
|
0 |
7 |
if $@ |
1013
|
0 |
2 |
if $@ |
1035
|
0 |
2 |
if $@ |
1040
|
1 |
1 |
if (scalar @values) { } |
1061
|
1 |
1 |
if (scalar @values) { } |
1080
|
1 |
21 |
if $self->option("autosync") |
1082
|
0 |
22 |
if $@ |
1111
|
2 |
1 |
if $self->option("autosync") |
1114
|
0 |
3 |
if $@ |
1137
|
7 |
4 |
ref $link ? : |
1138
|
0 |
11 |
unless (defined $link) |
1143
|
8 |
3 |
if ($link =~ /\D/) |
1144
|
7 |
1 |
if ref $link |
1148
|
7 |
63 |
defined $t && $t =~ /$re/ ? : |
1149
|
1 |
9 |
defined $t && $t eq $link ? : |
|
7 |
1 |
defined $re ? : |
1150
|
0 |
8 |
if (@links > 1) { } |
|
0 |
8 |
elsif (@links == 0) { } |
1159
|
0 |
8 |
if ($possible_links[$count]->url =~ /^javascript:(.*)/i) |
1166
|
11 |
0 |
if (defined $link) |
1169
|
7 |
1 |
ref $user_link ? : |
|
3 |
8 |
$user_link =~ /^\d+$/ ? : |
1181
|
1 |
10 |
if ($self->option("autosync")) |
1186
|
0 |
11 |
if $@ |
1194
|
0 |
1 |
if $@ |
1209
|
1 |
1 |
if $self->option("autosync") |
1212
|
0 |
2 |
if $@ |
1229
|
1 |
2 |
if $self->option("autosync") |
1232
|
0 |
3 |
if $@ |
1275
|
1 |
1 |
if ($option and exists $self->{'options'}{$option}) { } |
1276
|
1 |
0 |
if ($option and defined $value) { } |
1282
|
0 |
1 |
if $option |
1336
|
0 |
0 |
if (@_) |
1357
|
14 |
0 |
if ($form) { } |
1364
|
0 |
14 |
if $@ |
1366
|
23 |
1 |
defined $_->[1] ? : |
1390
|
3 |
0 |
if (scalar @_ == 2) { } |
1392
|
0 |
3 |
unless defined $password |
1434
|
0 |
0 |
if $HTML::TableExtract::VERSION < 2 |
1459
|
0 |
0 |
if $@ |
1488
|
0 |
0 |
if $HTML::TableExtract::VERSION < 2 |
1497
|
0 |
0 |
if (grep {/\S/;} @$row) |
1503
|
2 |
0 |
if $@ |
1560
|
0 |
49 |
if $class eq "Ask" |
1562
|
49 |
0 |
if ($class) { } |
1565
|
2 |
47 |
if (ref $name) { } |
1575
|
0 |
49 |
if $@ |
1607
|
1 |
62 |
if (not $code =~ /^eval\s+(.*)$/ms) { } |
1614
|
0 |
62 |
if (my $err = $@) |
1640
|
3 |
1 |
if ($file) { } |
1642
|
2 |
1 |
if ($@) |
1669
|
7 |
3 |
defined ${"${_}::VERSION";} ? : |
1685
|
1 |
0 |
if ($timeout) { } |
1687
|
0 |
1 |
if ($@) |
1708
|
0 |
1 |
if ($self->agent->content) { } |
1710
|
0 |
0 |
if ($@) |
1732
|
0 |
0 |
if (defined $referrer) { } |
1734
|
0 |
0 |
if ($@) |
1788
|
3 |
62 |
if (ref $code) { } |
1791
|
3 |
0 |
if ($d->can("ambient_pragmas")) |
1824
|
0 |
1 |
if (@ARGV) { } |
1846
|
0 |
83 |
unless $self->{'shell'} |
1854
|
0 |
32 |
if ($input->possible_values) |
1861
|
0 |
32 |
unless ($input->type =~ /^(submit|hidden)$/) |
1864
|
0 |
0 |
if $value eq "" and $input->type eq "checkbox" |