File Coverage

blib/lib/Perl/Critic/Exception.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 23 23 100.0


line stmt bran cond sub pod time code
1             package Perl::Critic::Exception;
2              
3 40     40   26653 use 5.010001;
  40         168  
4 40     40   226 use strict;
  40         103  
  40         921  
5 40     40   219 use warnings;
  40         104  
  40         2443  
6              
7             our $VERSION = '1.146';
8              
9             #-----------------------------------------------------------------------------
10              
11             use Exception::Class (
12 40         553 'Perl::Critic::Exception' => {
13             isa => 'Exception::Class::Base',
14             description => 'A problem discovered by Perl::Critic.',
15             },
16 40     40   303 );
  40         129  
17              
18 40     40   14728 use Exporter 'import';
  40         93  
  40         3454  
19              
20             #-----------------------------------------------------------------------------
21              
22             sub short_class_name {
23 10     10 1 22 my ( $self ) = @_;
24              
25 10         330 return substr ref $self, (length 'Perl::Critic') + 2;
26             }
27              
28             #-----------------------------------------------------------------------------
29              
30              
31             1;
32              
33             __END__
34              
35             #-----------------------------------------------------------------------------
36              
37             =pod
38              
39             =for stopwords
40              
41             =head1 NAME
42              
43             Perl::Critic::Exception - A problem identified by L<Perl::Critic|Perl::Critic>.
44              
45             =head1 DESCRIPTION
46              
47             A base class for all problems discovered by
48             L<Perl::Critic|Perl::Critic>. This exists to enable differentiating
49             exceptions from L<Perl::Critic|Perl::Critic> code from those
50             originating in other modules.
51              
52             This is an abstract class. It should never be instantiated.
53              
54              
55             =head1 INTERFACE SUPPORT
56              
57             This is considered to be a public class. Any changes to its interface
58             will go through a deprecation cycle.
59              
60              
61             =head1 METHODS
62              
63             =over
64              
65             =item C<short_class_name()>
66              
67             Retrieve the name of the class of this object with C<'Perl::Critic::'>
68             stripped off.
69              
70              
71             =back
72              
73              
74             =head1 AUTHOR
75              
76             Elliot Shank <perl@galumph.com>
77              
78              
79             =head1 COPYRIGHT
80              
81             Copyright (c) 2007-2011 Elliot Shank.
82              
83             This program is free software; you can redistribute it and/or modify
84             it under the same terms as Perl itself. The full text of this license
85             can be found in the LICENSE file included with this module.
86              
87             =cut
88              
89             # Local Variables:
90             # mode: cperl
91             # cperl-indent-level: 4
92             # fill-column: 78
93             # indent-tabs-mode: nil
94             # c-indentation-style: bsd
95             # End:
96             # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :