File Coverage

blib/lib/Perl/ToPerl6/Exception/Configuration/Option/Transformer.pm
Criterion Covered Total %
statement 18 19 94.7
branch 1 2 50.0
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 26 28 92.8


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