line |
true |
false |
branch |
123
|
0 |
0 |
$self->ssl_verify ? : |
142
|
0 |
0 |
if ($self->do_javascript) |
143
|
0 |
0 |
if ($self->brik_has_module('WWW::Mechanize::PhantomJS') and $self->brik_has_binary('phantomjs')) { } |
151
|
0 |
0 |
if (not $self->do_redirects and $mechanize eq 'WWW::Mechanize::PhantomJS') { } |
|
0 |
0 |
elsif ($self->do_redirects) { } |
163
|
0 |
0 |
if (defined $src_ip) |
164
|
0 |
0 |
unless my $na = "Metabrik::Network::Address"->new_from_brik_init($self) |
165
|
0 |
0 |
unless ($na->is_ip($src_ip)) |
172
|
0 |
0 |
unless (defined $mech) |
176
|
0 |
0 |
if ($self->user_agent) { } |
181
|
0 |
0 |
if ($mech->can("agent_alias")) |
186
|
0 |
0 |
defined $username ? : |
187
|
0 |
0 |
defined $password ? : |
188
|
0 |
0 |
if (defined $username and defined $password) |
194
|
0 |
0 |
if ($self->log->level > 2) |
215
|
0 |
0 |
unless $self->brik_help_run_undef_arg($method, $uri) |
219
|
0 |
0 |
defined $username ? : |
220
|
0 |
0 |
defined $password ? : |
222
|
0 |
0 |
unless (defined $self->client) |
223
|
0 |
0 |
unless $client = $self->create_user_agent($uri, $username, $password) |
228
|
0 |
0 |
if (defined $add_headers) |
231
|
0 |
0 |
if (ref $v eq 'ARRAY') { } |
245
|
0 |
0 |
if ($method ne "get" and ref $client eq "WWW::Mechanize::PhantomJS") |
248
|
0 |
0 |
if ($method eq 'post' or $method eq 'put') { } |
|
0 |
0 |
elsif ($method eq 'patch') { } |
|
0 |
0 |
elsif ($method eq 'options' or $method eq 'patch') { } |
264
|
0 |
0 |
if ($@) |
266
|
0 |
0 |
if ($@ =~ /read timeout/i) |
276
|
0 |
0 |
unless ($self->ignore_content) |
277
|
0 |
0 |
if ($self->do_javascript) { } |
288
|
0 |
0 |
if ($r{'content'} =~ /^Can't connect to .+Connection timed out at /is) { } |
|
0 |
0 |
elsif ($r{'content'} =~ /^Can't connect to .+?\n\n(.+?) at /is) { } |
|
0 |
0 |
elsif ($r{'content'} =~ /^Connect failed: connect: Interrupted system call/i) { } |
317
|
0 |
0 |
unless $self->_method($uri, $username, $password, "get") |
325
|
0 |
0 |
unless $self->brik_help_run_undef_arg("post", $href) |
334
|
0 |
0 |
unless $self->brik_help_run_undef_arg("put", $href) |
343
|
0 |
0 |
unless $self->brik_help_run_undef_arg("patch", $href) |
373
|
0 |
0 |
unless (defined $last) |
384
|
0 |
0 |
unless (defined $last) |
388
|
0 |
0 |
if ($self->do_javascript) |
402
|
0 |
0 |
unless $self->get(@args) |
410
|
0 |
0 |
unless $self->post(@args) |
419
|
0 |
0 |
unless (defined $last) |
426
|
0 |
0 |
if ($@) |
438
|
0 |
0 |
unless (defined $last) |
461
|
0 |
0 |
unless $self->brik_help_run_undef_arg("delete_header", $header) |
477
|
0 |
0 |
unless $self->brik_help_run_undef_arg("get_header", $header) |
479
|
0 |
0 |
unless my $headers = $self->headers |
480
|
0 |
0 |
if (exists $headers->{$header}) |
496
|
0 |
0 |
unless $self->brik_help_run_undef_arg("set_request_header", $header) |
497
|
0 |
0 |
unless $self->brik_help_run_undef_arg("set_request_header", $value) |
509
|
0 |
0 |
unless (defined $last) |
526
|
0 |
0 |
unless (defined $last) |
532
|
0 |
0 |
if ($self->log->level > 2) |
541
|
0 |
0 |
unless my $content = $self->content |
559
|
0 |
0 |
if ($type ne "submit") |
575
|
0 |
0 |
unless $self->brik_help_run_undef_arg("trace_redirect", $uri) |
591
|
0 |
0 |
if ($@) |
602
|
0 |
0 |
if ($this->{'code'} != 302 and $this->{'code'} != 301) |
618
|
0 |
0 |
unless $self->brik_help_run_undef_arg("screenshot", $uri) |
619
|
0 |
0 |
unless $self->brik_help_run_undef_arg("screenshot", $output) |
621
|
0 |
0 |
if ($self->brik_has_module("WWW::Mechanize::PhantomJS") and $self->brik_has_binary("phantomjs")) |
623
|
0 |
0 |
unless my $mech = "WWW::Mechanize::PhantomJS"->new |
626
|
0 |
0 |
unless my $get = $mech->get($uri) |
629
|
0 |
0 |
unless my $data = $mech->content_as_png |
632
|
0 |
0 |
unless my $write = "Metabrik::File::Write"->new_from_brik_init($self) |
637
|
0 |
0 |
unless $write->open($output) |
638
|
0 |
0 |
unless $write->write($data) |
651
|
0 |
0 |
unless $self->brik_help_run_undef_arg("eval_javascript", $js) |
655
|
0 |
0 |
if ($self->brik_has_module("WWW::Mechanize::PhantomJS") and $self->brik_has_binary("phantomjs")) |
657
|
0 |
0 |
unless my $mech = "WWW::Mechanize::PhantomJS"->new("launch_arg", ["ghostdriver/src/main.js"]) |
672
|
0 |
0 |
unless $self->brik_help_run_undef_arg("info", $uri) |
674
|
0 |
0 |
unless my $r = $self->get($uri) |
719
|
0 |
0 |
if ($self->log->level > 2) |
726
|
0 |
0 |
if defined $this |
730
|
0 |
0 |
if (defined $title) |
746
|
0 |
0 |
unless $self->brik_help_run_undef_arg("mirror", $url) |
747
|
0 |
0 |
unless my $ref = $self->brik_help_run_invalid_arg("mirror", $url, "SCALAR", "ARRAY") |
750
|
0 |
0 |
if ($ref eq 'ARRAY') { } |
751
|
0 |
0 |
unless $self->brik_help_run_empty_array_arg("mirror", $url) |
754
|
0 |
0 |
unless my $file = $self->mirror($this, $output) |
759
|
0 |
0 |
unless ($url =~ m[^https?://] or $url =~ m[^ftp://]) |
763
|
0 |
0 |
unless my $sf = "Metabrik::System::File"->new_from_brik_init($self) |
764
|
0 |
0 |
if (not defined $output) { } |
765
|
0 |
0 |
unless my $filename = $sf->basefile($url) |
769
|
0 |
0 |
unless ($sf->is_absolute($output)) |
776
|
0 |
0 |
unless my $mech = $self->create_user_agent |
784
|
0 |
0 |
if ($@) |
790
|
0 |
0 |
if ($code == 200) { } |
|
0 |
0 |
elsif ($code == 304) { } |
809
|
0 |
0 |
unless $self->brik_help_run_undef_arg("parse", $html) |