| 1 | package WebService::Walmart::Exception; | ||
| 2 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | $WebService::Walmart::Exception::VERSION = "0.01"; | |
| 5 | |||
| 6 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | with 'Throwable'; | |
| 8 | |||
| 9 | use overload | ||
| 10 | 1 | ▶ | q{""} => 'as_string', |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | fallback => 1; | |
| 12 | |||
| 13 | 1 | has message => ( is => 'rw', isa => 'Str'); | |
| 14 | 1 | has method => ( is => 'rw', isa => 'Str'); | |
| 15 | 1 | has code => ( is => 'rw', isa => 'Int'); | |
| 16 | 1 | has reason => ( is => 'rw', isa => 'Str'); | |
| 17 | 1 | has filename => ( is => 'rw', isa => 'Str'); | |
| 18 | 1 | has linenum => ( is => 'rw', isa => 'Str'); | |
| 19 | |||
| 20 | 0 | ▶ | sub as_string { |
|
Subroutine
as_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 21 | 0 | my $self = shift; | |
| 22 | 0 | my $message = $self->method.'(): '; | |
| 23 | 0 | $message .= $self->message . ' ' . $self->code . ' ' . $self->reason. ' '; | |
| 24 | 0 | $message .= 'file: ' . $self->filename .' on line number ' . $self->linenum. ' '; | |
| 25 | 0 | $message .= "\n"; | |
| 26 | 0 | return $message; | |
| 27 | } | ||
| 28 | |||
| 29 | 1 | 1; | |
| 30 | =pod | ||
| 31 | |||
| 32 | |||
| 33 | =head1 SYNOPSIS | ||
| 34 | |||
| 35 | This module represents an exception. | ||
| 36 | |||
| 37 | You probably shouldn't be calling this directly | ||
| 38 | |||
| 39 | =cut | ||