File Coverage

blib/lib/Perl/ToPerl6/Exception.pm
Criterion Covered Total %
statement 14 16 87.5
branch n/a
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 20 23 86.9


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