line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Moose::Role; |
3
|
179
|
|
|
179
|
|
84545
|
use namespace::clean -except => 'meta'; |
|
179
|
|
|
|
|
492
|
|
|
179
|
|
|
|
|
1396
|
|
4
|
179
|
|
|
179
|
|
748274
|
|
|
179
|
|
|
|
|
461
|
|
|
179
|
|
|
|
|
2001
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
|
|
|
|
|
|
q{""} => sub { $_[0]->as_string }, |
7
|
236
|
|
|
236
|
|
4680
|
fallback => 1; |
8
|
179
|
|
|
179
|
|
56491
|
|
|
179
|
|
|
|
|
417
|
|
|
179
|
|
|
|
|
2092
|
|
9
|
|
|
|
|
|
|
requires qw/as_string throw rethrow/; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
1; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Catalyst::Exception::Interface - Role defining the interface for Catalyst exceptions |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
package My::Catalyst::Like::Exception; |
21
|
|
|
|
|
|
|
use Moose; |
22
|
|
|
|
|
|
|
use namespace::clean -except => 'meta'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
with 'Catalyst::Exception::Interface'; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# This comprises the required interface. |
27
|
|
|
|
|
|
|
sub as_string { 'the exception text for stringification' } |
28
|
|
|
|
|
|
|
sub throw { shift; die @_ } |
29
|
|
|
|
|
|
|
sub rethrow { shift; die @_ } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 DESCRIPTION |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
This is a role for the required interface for Catalyst exceptions. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
It ensures that all exceptions follow the expected interface, |
36
|
|
|
|
|
|
|
and adds overloading for stringification when composed onto a |
37
|
|
|
|
|
|
|
class. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 REQUIRED METHODS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 as_string |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 throw |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 rethrow |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 METHODS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 meta |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Provided by Moose |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SEE ALSO |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=over 4 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item L<Catalyst> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item L<Catalyst::Exception> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=back |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHORS |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Catalyst Contributors, see Catalyst.pm |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This library is free software. You can redistribute it and/or modify |
70
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |