| 1 | package Finance::Bank::Bankwest::Parser::Logout; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Online Banking logout web page parser | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 9 | $Finance::Bank::Bankwest::Parser::Logout::VERSION = '1.2.8'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | ## no critic (RequireUseStrict, RequireUseWarnings, RequireEndWithOne) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 10 | ▶ | use MooseX::Declare; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 10 | ▶ | use HTTP::Response::Switch::Handler 1.000000; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | class Finance::Bank::Bankwest::Parser::Logout | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | with HTTP::Response::Switch::Handler | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 10 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 10 | ▶ | use Web::Scraper qw{ scraper process }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 10 | my $token = 'You have successfully logged out from your session'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 4 | ▶ | my $scraper = scraper { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 4 | process '#contentColumn', 'text' => 'TEXT'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 10 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 10 | ▶ | method handle { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=3 SCAR=11.0
Subroutine
handle: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 2 | my $scrape = $scraper->scrape($self->response); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | $self->decline | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | if not defined $scrape->{'text'} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 2 | ▶ | or index($scrape->{'text'}, $token) < 0; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%4/6
not defined $scrape->{"text"} or index($scrape->{"text"}, $token) == -1
not defined $scrape->{"text"} or index($scrape->{"text"}, $token) == -1
MC/DC50%1/2
not defined $scrape->{"text"} or index($scrape->{"text"}, $token) == -1
not defined $scrape->{"text"}
index($scrape->{"text"}, $token) == -1
MC/DC50%1/2
not defined $scrape->{"text"} or index($scrape->{"text"}, $token) == -1
not defined $scrape->{"text"}
index($scrape->{"text"}, $token) == -1
Truth table66%2/3
not(A) or B
A= not defined $scrape->{"text"}B= index($scrape->{"text"}, $token) == -1
Truth table66%2/3
not(A) or B
A= not defined $scrape->{"text"}B= index($scrape->{"text"}, $token) == -1
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 10 | } | |||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 10 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||