Enbld/Error.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 91.3% 21 / 23 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Enbld/Target/Attribute/DarwinArgument.pm ↑ Summary Enbld/Target/Attribute/AllowedCondition.pm »
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;
« Enbld/Target/Attribute/DarwinArgument.pm ↑ Summary Enbld/Target/Attribute/AllowedCondition.pm »