8923b414464ef5eaceac2e5dc1a8cabbb36f7fa8
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / lib / Perl / Critic / Exception / IO.pm
1 ##############################################################################
2 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/lib/Perl/Critic/Exception/IO.pm $
3 #     $Date: 2008-07-03 10:19:10 -0500 (Thu, 03 Jul 2008) $
4 #   $Author: clonezone $
5 # $Revision: 2489 $
6 ##############################################################################
7
8 package Perl::Critic::Exception::IO;
9
10 use 5.006001;
11 use strict;
12 use warnings;
13
14 use Carp qw{ confess };
15 use English qw(-no_match_vars);
16 use Readonly;
17
18 use Perl::Critic::Utils qw{ :characters };
19
20 our $VERSION = '1.088';
21
22 #-----------------------------------------------------------------------------
23
24 use Exception::Class (
25     'Perl::Critic::Exception::IO' => {
26         isa         => 'Perl::Critic::Exception',
27         description => 'An input/output problem.',
28         fields      => [ qw< file_name errno > ],
29         alias       => 'throw_io',
30     },
31 );
32
33 #-----------------------------------------------------------------------------
34
35 Readonly::Array our @EXPORT_OK => qw< throw_io >;
36
37 #-----------------------------------------------------------------------------
38
39 1;
40
41 #-----------------------------------------------------------------------------
42
43 __END__
44
45 =pod
46
47 =for stopwords
48
49 =head1 NAME
50
51 Perl::Critic::Exception::IO - A problem with input or output.
52
53 =head1 DESCRIPTION
54
55 The outside world can do nasty things to your poor, innocent code.
56
57
58 =head1 METHODS
59
60 =over
61
62 =item C<file_name()>
63
64 Returns the name of the file that the problem was found with, if available.
65
66
67 =item C<errno()>
68
69 The value of C<$ERRNO>/C<$!> at the time the problem was found.
70
71
72 =back
73
74
75 =head1 AUTHOR
76
77 Elliot Shank <perl@galumph.com>
78
79 =head1 COPYRIGHT
80
81 Copyright (c) 2007-2008 Elliot Shank.  All rights reserved.
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 ##############################################################################
90 # Local Variables:
91 #   mode: cperl
92 #   cperl-indent-level: 4
93 #   fill-column: 78
94 #   indent-tabs-mode: nil
95 #   c-indentation-style: bsd
96 # End:
97 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :