| 1 | package Enbld::Error; | ||
| 2 | |||
| 3 | 12 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 12 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | use overload ( | ||
| 7 | 12 | q{""} => 'to_string', | |
| 8 | fallback => 1, | ||
| 9 | 12 | ▶ | ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | sub new { | ||
| 12 | 17 | ▶ | my ( $class, $message ) = @_; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 13 | |||
| 14 | 17 | chomp( $message ); | |
| 15 | |||
| 16 | 17 | my $self = { | |
| 17 | message => $message, | ||
| 18 | }; | ||
| 19 | |||
| 20 | 17 | return bless $self, $class; | |
| 21 | } | ||
| 22 | |||
| 23 | sub to_string { | ||
| 24 | 16 | ▶ | my $self = shift; |
|
Subroutine
to_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 25 | |||
| 26 | 16 | return "ERROR:$self->{message}\n"; | |
| 27 | } | ||
| 28 | |||
| 29 | 12 | 1; | |