| 1 | package JQ::Lite::Error; | ||||||||||
| 2 | |||||||||||
| 3 | 182 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 182 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 182 | ▶ | use overload '""' => 'as_string', fallback => 1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 11 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||
| 8 | 11 | my ($class, %args) = @_; | |||||||||
| 9 | 11 | ▶ | my $message = defined $args{message} ? "$args{message}" : ''; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 10 | 11 | $message =~ s/\s+\z//; | |||||||||
| 11 | 11 | return bless { message => $message }, $class; | |||||||||
| 12 | } | ||||||||||
| 13 | |||||||||||
| 14 | 19 | ▶ | sub message { return $_[0]->{message} } | ||||||||
|
Subroutine
message: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 15 | 0 | ▶ | sub category { return 'unknown' } | ||||||||
|
Subroutine
category: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 16 | 18 | ▶ | sub as_string { return $_[0]->message } | ||||||||
|
Subroutine
as_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 17 | |||||||||||
| 18 | package JQ::Lite::Error::Input; | ||||||||||
| 19 | 182 | ▶ | use parent -norequire, 'JQ::Lite::Error'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 1 | ▶ | sub category { return 'input' } | ||||||||
|
Subroutine
category: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | package JQ::Lite::Error::Parse; | ||||||||||
| 23 | 182 | ▶ | use parent -norequire, 'JQ::Lite::Error'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | 1 | ▶ | sub category { return 'parse' } | ||||||||
|
Subroutine
category: called CC=1 SCAR=0.0
| |||||||||||
| 25 | |||||||||||
| 26 | package JQ::Lite::Error::Evaluation; | ||||||||||
| 27 | 182 | ▶ | use parent -norequire, 'JQ::Lite::Error'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 28 | 1 | ▶ | sub category { return 'evaluation' } | ||||||||
|
Subroutine
category: called CC=1 SCAR=0.0
| |||||||||||
| 29 | |||||||||||
| 30 | 182 | 1; | |||||||||
| 31 | |||||||||||
| 32 | __END__ | ||||||||||