| 1 | package Minilla::Errors; | ||
| 2 | 77 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 77 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 77 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 77 | ▶ | use Carp (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | package Minilla::Error::CommandExit; | ||
| 9 | |||
| 10 | 77 | ▶ | use overload '""' => 'message', fallback => 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 6 | ▶ | sub throw { |
|
Subroutine
throw: called CC=1 SCAR=0.0
| |||
| 13 | 6 | my ($class, $body) = @_; | |
| 14 | 6 | my $self = bless { body => $body, message => Carp::longmess($class) }, $class; | |
| 15 | 6 | die $self; | |
| 16 | } | ||
| 17 | |||
| 18 | 0 | ▶ | sub body { shift->{body} } |
|
Subroutine
body: not called CC=1 SCAR=6.9
| |||
| 19 | |||
| 20 | 6 | ▶ | sub message { |
|
Subroutine
message: called CC=1 SCAR=0.0
| |||
| 21 | 6 | my($self) = @_; | |
| 22 | 6 | return $self->{message}; | |
| 23 | } | ||
| 24 | |||
| 25 | 77 | 1; | |
| 26 | |||