| 1 | package Finance::Bank::Bankwest::Error::WithResponse; | ||
| 2 | # ABSTRACT: make exceptions hold an L<HTTP::Response> | ||
| 3 | 23 | $Finance::Bank::Bankwest::Error::WithResponse::VERSION = '1.2.8'; | |
| 4 | |||
| 5 | ## no critic (RequireUseStrict, RequireUseWarnings, RequireEndWithOne) | ||
| 6 | 23 | ▶ | use MooseX::Declare; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 23 | ▶ | role Finance::Bank::Bankwest::Error::WithResponse { |
|
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
| |||
| 8 | |||
| 9 | 23 | ▶ | use MooseX::Types; # for "class_type" |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | # Allow instantiation via single argument: ->new($http_response). | ||
| 12 | 23 | class_type 'HTTP::Response'; | |
| 13 | 23 | with 'MooseX::OneArgNew' => { | |
| 14 | type => 'HTTP::Response', | ||
| 15 | init_arg => 'response', | ||
| 16 | }; | ||
| 17 | |||
| 18 | 23 | has 'response' => ( | |
| 19 | is => 'ro', | ||
| 20 | isa => 'HTTP::Response', | ||
| 21 | required => 1, | ||
| 22 | ); | ||
| 23 | 23 | ▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | |||
| 25 | __END__ | ||