blib/lib/Perl/Critic/Exception.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 25 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/script/perlcritic ↑ Summary blib/lib/Perl/Critic/Exception/Configuration.pm »
1 package Perl::Critic::Exception;
2  
3 40 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 40 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 40 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 40 our $VERSION = '1.150';
8  
9 #-----------------------------------------------------------------------------
10  
11 use Exception::Class (
12 40 'Perl::Critic::Exception' => {
13 isa => 'Exception::Class::Base',
14 description => 'A problem discovered by Perl::Critic.',
15 },
16 40 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 40 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 #-----------------------------------------------------------------------------
21  
22 sub short_class_name {
23 10 ▶ my ( $self ) = @_;
Subroutine short_class_name: called CC=1 SCAR=0.0
Pod documented
24  
25 10 return substr ref $self, (length 'Perl::Critic') + 2;
26 }
27  
28 #-----------------------------------------------------------------------------
29  
30  
31 40 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 :
« blib/script/perlcritic ↑ Summary blib/lib/Perl/Critic/Exception/Configuration.pm »