File Coverage

blib/lib/Config/MVP/Error.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 15 16 93.7


line stmt bran cond sub pod time code
1             package Config::MVP::Error 2.200013;
2             # ABSTRACT: common exceptions class
3              
4 4     4   29 use Moose;
  4         8  
  4         24  
5              
6             has message => (
7             is => 'ro',
8             isa => 'Str',
9             required => 1,
10             lazy => 1,
11             default => sub { $_->ident },
12             );
13              
14             sub as_string {
15 1     1 0 10779 my ($self) = @_;
16 1         37 join qq{\n}, $self->message, "\n", $self->stack_trace;
17             }
18              
19 4     4   24401 use overload (q{""} => 'as_string');
  4         9  
  4         32  
20              
21             with(
22             'Throwable',
23             'Role::Identifiable::HasIdent',
24             'Role::HasMessage',
25             'StackTrace::Auto',
26             'MooseX::OneArgNew' => {
27             type => 'Str',
28             init_arg => 'ident',
29             },
30             );
31              
32 4     4   391 no Moose;
  4         9  
  4         22  
33             __PACKAGE__->meta->make_immutable(inline_constructor => 0);
34             1;
35              
36             __END__
37              
38             =pod
39              
40             =encoding UTF-8
41              
42             =head1 NAME
43              
44             Config::MVP::Error - common exceptions class
45              
46             =head1 VERSION
47              
48             version 2.200013
49              
50             =head1 PERL VERSION
51              
52             This module should work on any version of perl still receiving updates from
53             the Perl 5 Porters. This means it should work on any version of perl released
54             in the last two to three years. (That is, if the most recently released
55             version is v5.40, then this module should work on both v5.40 and v5.38.)
56              
57             Although it may work on older versions of perl, no guarantee is made that the
58             minimum required version will not be increased. The version may be increased
59             for any reason, and there is no promise that patches will be accepted to lower
60             the minimum required perl.
61              
62             =head1 AUTHOR
63              
64             Ricardo Signes <cpan@semiotic.systems>
65              
66             =head1 COPYRIGHT AND LICENSE
67              
68             This software is copyright (c) 2022 by Ricardo Signes.
69              
70             This is free software; you can redistribute it and/or modify it under
71             the same terms as the Perl 5 programming language system itself.
72              
73             =cut