| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package autodie::skip; |
|
2
|
1
|
|
|
1
|
|
702
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
40
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
118
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '2.29'; # VERSION |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# This package exists purely so people can inherit from it, |
|
8
|
|
|
|
|
|
|
# which isn't at all how roles are supposed to work, but it's |
|
9
|
|
|
|
|
|
|
# how people will use them anyway. |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
if ($] < 5.010) { |
|
12
|
|
|
|
|
|
|
# Older Perls don't have a native ->DOES. Let's provide a cheap |
|
13
|
|
|
|
|
|
|
# imitation here. |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
*DOES = sub { return shift->isa(@_); }; |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__END__ |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
autodie::skip - Skip a package when throwing autodie exceptions |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 SYNPOSIS |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
use parent qw(autodie::skip); |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
This dummy class exists to signal that the class inheriting it should |
|
33
|
|
|
|
|
|
|
be skipped when reporting exceptions from autodie. This is useful |
|
34
|
|
|
|
|
|
|
for utility classes like L<Path::Tiny> that wish to report the location |
|
35
|
|
|
|
|
|
|
of where they were called on failure. |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
If your class has a better way of doing roles, then you should not |
|
38
|
|
|
|
|
|
|
load this class and instead simply say that your class I<DOES> |
|
39
|
|
|
|
|
|
|
C<autodie::skip> instead. |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 AUTHOR |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Copyright 2013, Paul Fenwick <pjf@cpan.org> |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 LICENSE |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This module is free software. You may distribute it under the same |
|
48
|
|
|
|
|
|
|
terms as Perl itself. |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
L<autodie>, L<autodie::exception> |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=for Pod::Coverage DOES |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |