1package autodie::skip; 2use strict; 3use warnings; 4 5our $VERSION = '2.37'; # 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 11if ($] < 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 181; 19 20__END__ 21 22=head1 NAME 23 24autodie::skip - Skip a package when throwing autodie exceptions 25 26=head1 SYNPOSIS 27 28 use parent qw(autodie::skip); 29 30=head1 DESCRIPTION 31 32This dummy class exists to signal that the class inheriting it should 33be skipped when reporting exceptions from autodie. This is useful 34for utility classes like L<Path::Tiny> that wish to report the location 35of where they were called on failure. 36 37If your class has a better way of doing roles, then you should not 38load this class and instead simply say that your class I<DOES> 39C<autodie::skip> instead. 40 41=head1 AUTHOR 42 43Copyright 2013, Paul Fenwick <pjf@cpan.org> 44 45=head1 LICENSE 46 47This module is free software. You may distribute it under the same 48terms as Perl itself. 49 50=head1 SEE ALSO 51 52L<autodie>, L<autodie::exception> 53 54=for Pod::Coverage DOES 55 56=cut 57