File Coverage

blib/lib/Perl/ToPerl6/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::ToPerl6::Exception;
2              
3 30     30   16007 use 5.006001;
  30         114  
4 30     30   126 use strict;
  30         44  
  30         622  
5 30     30   120 use warnings;
  30         35  
  30         1732  
6              
7             our $VERSION = '0.03';
8              
9             #-----------------------------------------------------------------------------
10              
11             use Exception::Class (
12 30         464 'Perl::ToPerl6::Exception' => {
13             isa => 'Exception::Class::Base',
14             description => 'A problem discovered by Perl::ToPerl6.',
15             },
16 30     30   142 );
  30         54  
17              
18 30     30   7512 use Exporter 'import';
  30         42  
  30         2214  
19              
20             #-----------------------------------------------------------------------------
21              
22             sub short_class_name {
23 10     10 1 12 my ( $self ) = @_;
24              
25 10         314 return substr ref $self, (length 'Perl::ToPerl6') + 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::ToPerl6::Exception - A problem identified by L<Perl::ToPerl6|Perl::ToPerl6>.
44              
45             =head1 DESCRIPTION
46              
47             A base class for all problems discovered by
48             L<Perl::ToPerl6|Perl::ToPerl6>. This exists to enable differentiating
49             exceptions from L<Perl::ToPerl6|Perl::ToPerl6> 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::ToPerl6::'>
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 :