line |
true |
false |
branch |
117
|
0 |
0 |
$self->ssl_verify ? : |
136
|
0 |
0 |
if ($self->do_javascript) |
137
|
0 |
0 |
if ($self->brik_has_module('WWW::Mechanize::PhantomJS') and $self->brik_has_binary('phantomjs')) { } |
145
|
0 |
0 |
if (not $self->do_redirects and $mechanize eq 'WWW::Mechanize::PhantomJS') { } |
|
0 |
0 |
elsif ($self->do_redirects) { } |
157
|
0 |
0 |
if (defined $src_ip) |
158
|
0 |
0 |
unless my $na = 'Metabrik::Network::Address'->new_from_brik_init($self) |
159
|
0 |
0 |
unless ($na->is_ip($src_ip)) |
166
|
0 |
0 |
unless (defined $mech) |
170
|
0 |
0 |
if ($self->user_agent) { } |
175
|
0 |
0 |
if ($mech->can('agent_alias')) |
180
|
0 |
0 |
defined $username ? : |
181
|
0 |
0 |
defined $password ? : |
182
|
0 |
0 |
if (defined $username and defined $password) |
188
|
0 |
0 |
if ($self->log->level > 2) |
209
|
0 |
0 |
unless $self->brik_help_run_undef_arg($method, $uri) |
213
|
0 |
0 |
defined $username ? : |
214
|
0 |
0 |
defined $password ? : |
216
|
0 |
0 |
unless (defined $self->client) |
217
|
0 |
0 |
unless $client = $self->create_user_agent($uri, $username, $password) |
222
|
0 |
0 |
if (defined $add_headers) |
225
|
0 |
0 |
if (ref $v eq 'ARRAY') { } |
239
|
0 |
0 |
if ($method ne 'get' and ref $client eq 'WWW::Mechanize::PhantomJS') |
242
|
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') { } |
258
|
0 |
0 |
if ($@) |
260
|
0 |
0 |
if ($@ =~ /read timeout/i) |
270
|
0 |
0 |
unless ($self->ignore_content) |
271
|
0 |
0 |
if ($self->do_javascript) { } |
282
|
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) { } |
311
|
0 |
0 |
unless $self->_method($uri, $username, $password, 'get') |
319
|
0 |
0 |
unless $self->brik_help_run_undef_arg('post', $href) |
328
|
0 |
0 |
unless $self->brik_help_run_undef_arg('put', $href) |
337
|
0 |
0 |
unless $self->brik_help_run_undef_arg('patch', $href) |
367
|
0 |
0 |
unless (defined $last) |
378
|
0 |
0 |
unless (defined $last) |
382
|
0 |
0 |
if ($self->do_javascript) |
396
|
0 |
0 |
unless $self->get(@args) |
404
|
0 |
0 |
unless $self->post(@args) |
413
|
0 |
0 |
unless (defined $last) |
420
|
0 |
0 |
if ($@) |
432
|
0 |
0 |
unless (defined $last) |
455
|
0 |
0 |
unless $self->brik_help_run_undef_arg('delete_header', $header) |
471
|
0 |
0 |
unless $self->brik_help_run_undef_arg('get_header', $header) |
473
|
0 |
0 |
unless my $headers = $self->headers |
474
|
0 |
0 |
if (exists $headers->{$header}) |
490
|
0 |
0 |
unless $self->brik_help_run_undef_arg('set_request_header', $header) |
491
|
0 |
0 |
unless $self->brik_help_run_undef_arg('set_request_header', $value) |
503
|
0 |
0 |
unless (defined $last) |
520
|
0 |
0 |
unless (defined $last) |
526
|
0 |
0 |
if ($self->log->level > 2) |
535
|
0 |
0 |
unless my $content = $self->content |
553
|
0 |
0 |
if ($type ne 'submit') |
569
|
0 |
0 |
unless $self->brik_help_run_undef_arg('trace_redirect', $uri) |
585
|
0 |
0 |
if ($@) |
596
|
0 |
0 |
if ($this->{'code'} != 302 and $this->{'code'} != 301) |
612
|
0 |
0 |
unless $self->brik_help_run_undef_arg('screenshot', $uri) |
613
|
0 |
0 |
unless $self->brik_help_run_undef_arg('screenshot', $output) |
615
|
0 |
0 |
if ($self->brik_has_module('WWW::Mechanize::PhantomJS') and $self->brik_has_binary('phantomjs')) |
617
|
0 |
0 |
unless my $mech = 'WWW::Mechanize::PhantomJS'->new |
620
|
0 |
0 |
unless my $get = $mech->get($uri) |
623
|
0 |
0 |
unless my $data = $mech->content_as_png |
626
|
0 |
0 |
unless my $write = 'Metabrik::File::Write'->new_from_brik_init($self) |
631
|
0 |
0 |
unless $write->open($output) |
632
|
0 |
0 |
unless $write->write($data) |
645
|
0 |
0 |
unless $self->brik_help_run_undef_arg('eval_javascript', $js) |
649
|
0 |
0 |
if ($self->brik_has_module('WWW::Mechanize::PhantomJS') and $self->brik_has_binary('phantomjs')) |
651
|
0 |
0 |
unless my $mech = 'WWW::Mechanize::PhantomJS'->new('launch_arg', ['ghostdriver/src/main.js']) |
666
|
0 |
0 |
unless $self->brik_help_run_undef_arg('info', $uri) |
668
|
0 |
0 |
unless my $r = $self->get($uri) |
713
|
0 |
0 |
if ($self->log->level > 2) |
720
|
0 |
0 |
if defined $this |
724
|
0 |
0 |
if (defined $title) |
740
|
0 |
0 |
unless $self->brik_help_run_undef_arg('mirror', $url) |
741
|
0 |
0 |
unless my $ref = $self->brik_help_run_invalid_arg('mirror', $url, 'SCALAR', 'ARRAY') |
744
|
0 |
0 |
if ($ref eq 'ARRAY') { } |
745
|
0 |
0 |
unless $self->brik_help_run_empty_array_arg('mirror', $url) |
748
|
0 |
0 |
unless my $file = $self->mirror($this, $output) |
753
|
0 |
0 |
unless ($url =~ m[^https?://] or $url =~ m[^ftp://]) |
757
|
0 |
0 |
unless my $sf = 'Metabrik::System::File'->new_from_brik_init($self) |
758
|
0 |
0 |
if (not defined $output) { } |
759
|
0 |
0 |
unless my $filename = $sf->basefile($url) |
763
|
0 |
0 |
unless ($sf->is_absolute($output)) |
770
|
0 |
0 |
unless my $mech = $self->create_user_agent |
778
|
0 |
0 |
if ($@) |
784
|
0 |
0 |
if ($code == 200) { } |
|
0 |
0 |
elsif ($code == 304) { } |
803
|
0 |
0 |
unless $self->brik_help_run_undef_arg('parse', $html) |