« blib/lib/Perl/Critic/Exception/Configuration/Option/Global.pm
↑ Summary
blib/lib/Perl/Critic/Exception/Fatal/Generic.pm »
| 1 | package Perl::Critic::Exception::Fatal; | ||
| 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::Fatal' => { | |
| 13 | isa => 'Perl::Critic::Exception', | ||
| 14 | description => | ||
| 15 | 'A problem that should cause Perl::Critic to stop running.', | ||
| 16 | }, | ||
| 17 | 40 | ▶ | ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | |||
| 19 | #----------------------------------------------------------------------------- | ||
| 20 | |||
| 21 | sub new { | ||
| 22 | 22 | ▶ | my ($class, @args) = @_; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 23 | 22 | my $self = $class->SUPER::new(@args); | |
| 24 | |||
| 25 | 22 | $self->show_trace(1); | |
| 26 | |||
| 27 | 22 | return $self; | |
| 28 | } | ||
| 29 | |||
| 30 | #----------------------------------------------------------------------------- | ||
| 31 | |||
| 32 | sub full_message { | ||
| 33 | 10 | ▶ | my ( $self ) = @_; |
|
Subroutine
full_message: called CC=1 SCAR=0.0
Pod
documented
| |||
| 34 | |||
| 35 | return | ||
| 36 | 10 | $self->short_class_name() | |
| 37 | . q{: } | ||
| 38 | . $self->description() | ||
| 39 | . "\n\n" | ||
| 40 | . $self->message() | ||
| 41 | . "\n\n" | ||
| 42 | . gmtime $self->time() | ||
| 43 | . "\n\n"; | ||
| 44 | } | ||
| 45 | |||
| 46 | |||
| 47 | 40 | 1; | |
| 48 | |||
| 49 | __END__ | ||
| 50 | |||
| 51 | #----------------------------------------------------------------------------- | ||
| 52 | |||
| 53 | =pod | ||
| 54 | |||
| 55 | =for stopwords | ||
| 56 | |||
| 57 | =head1 NAME | ||
| 58 | |||
| 59 | Perl::Critic::Exception::Fatal - A problem that should cause L<Perl::Critic|Perl::Critic> to stop running. | ||
| 60 | |||
| 61 | =head1 DESCRIPTION | ||
| 62 | |||
| 63 | Something went wrong and processing should not continue. You should | ||
| 64 | never specifically look for this exception or one of its subclasses. | ||
| 65 | |||
| 66 | Note: the constructor invokes L<Exception::Class/"show_trace"> to | ||
| 67 | force stack-traces to be included in the standard stringification. | ||
| 68 | |||
| 69 | This is an abstract class. It should never be instantiated. | ||
| 70 | |||
| 71 | |||
| 72 | =head1 INTERFACE SUPPORT | ||
| 73 | |||
| 74 | This is considered to be a public class. Any changes to its interface | ||
| 75 | will go through a deprecation cycle. | ||
| 76 | |||
| 77 | |||
| 78 | =head1 METHODS | ||
| 79 | |||
| 80 | =over | ||
| 81 | |||
| 82 | =item C<full_message()> | ||
| 83 | |||
| 84 | Overrides L<Exception::Class/"full_message"> to include extra | ||
| 85 | information. | ||
| 86 | |||
| 87 | |||
| 88 | =back | ||
| 89 | |||
| 90 | |||
| 91 | =head1 AUTHOR | ||
| 92 | |||
| 93 | Elliot Shank <perl@galumph.com> | ||
| 94 | |||
| 95 | =head1 COPYRIGHT | ||
| 96 | |||
| 97 | Copyright (c) 2007-2011 Elliot Shank. | ||
| 98 | |||
| 99 | This program is free software; you can redistribute it and/or modify | ||
| 100 | it under the same terms as Perl itself. The full text of this license | ||
| 101 | can be found in the LICENSE file included with this module. | ||
| 102 | |||
| 103 | =cut | ||
| 104 | |||
| 105 | # Local Variables: | ||
| 106 | # mode: cperl | ||
| 107 | # cperl-indent-level: 4 | ||
| 108 | # fill-column: 78 | ||
| 109 | # indent-tabs-mode: nil | ||
| 110 | # c-indentation-style: bsd | ||
| 111 | # End: | ||
| 112 | # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround : | ||