| 1 | package Finance::Bank::Bankwest::Parser::ServiceMessage; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Online Banking service message web page parser | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 9 | $Finance::Bank::Bankwest::Parser::ServiceMessage::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::ServiceMessage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 Finance::Bank::Bankwest::Error::ServiceMessage (); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 10 | ▶ | use Web::Scraper qw{ scraper process }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 5 | ▶ | my $scraper = scraper { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 5 | ▶ | process '#divInterceptContent', 'div' => sub { 1 }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 5 | ▶ | process '#btnStartBanking', 'button' => sub { 1 }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 10 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | 3 | my $s = $scraper->scrape( $self->response ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 3 | ▶ | $self->decline if not $s->{'div'} or not $s->{'button'}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%4/6
$s->{"div"} and $s->{"button"}
$s->{"div"} and $s->{"button"}
MC/DC50%1/2
$s->{"div"} and $s->{"button"}
$s->{"div"}
$s->{"button"}
MC/DC50%1/2
$s->{"div"} and $s->{"button"}
$s->{"div"}
$s->{"button"}
Truth table66%2/3
A and B
A= $s->{"div"}B= $s->{"button"}
Truth table66%2/3
A and B
A= $s->{"div"}B= $s->{"button"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | Finance::Bank::Bankwest::Error::ServiceMessage | |||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | ->throw( $self->response ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 10 | } | |||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 10 | ▶ | } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||