| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::iTMS::Error; |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# Written by Thomas R. Sibley, |
|
4
|
|
|
|
|
|
|
# |
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
30
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
32
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION @EXPORT); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
64
|
|
|
9
|
|
|
|
|
|
|
$VERSION = '0.13'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
879
|
use Exporter::Lite; |
|
|
1
|
|
|
|
|
2097
|
|
|
|
1
|
|
|
|
|
10
|
|
|
12
|
|
|
|
|
|
|
@EXPORT = qw(error _debug _set_error); |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Net::iTMS::Error - Handles errors in Net::iTMS |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Error handling parts of the L distribution. |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 Methods |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=over 12 |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=item C |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Returns a string containing an error message (if there is one). |
|
29
|
|
|
|
|
|
|
Usually useful after a method has returned C for finding |
|
30
|
|
|
|
|
|
|
out what went wrong. |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
|
33
|
|
|
|
|
|
|
sub error { |
|
34
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
35
|
0
|
|
|
|
|
|
return $self->{error}; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _debug { |
|
39
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
40
|
0
|
0
|
|
|
|
|
print STDERR @_, "\n" if $self->{debug}; |
|
41
|
0
|
|
|
|
|
|
return 1; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub _set_error { |
|
45
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
46
|
0
|
|
|
|
|
|
$self->{error} = join '', @_; |
|
47
|
0
|
|
|
|
|
|
$self->_debug($self->{error}); |
|
48
|
0
|
|
|
|
|
|
return undef; |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=back |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 LICENSE |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Copyright 2004, Thomas R. Sibley. |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
You may use, modify, and distribute this package under the same terms as Perl itself. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHOR |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Thomas R. Sibley, L |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
42; |