line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::RNDC::Exception; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Net::RNDC::Exception::VERSION = '0.003'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
18
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
236
|
|
7
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1071
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
2
|
|
|
2
|
1
|
8
|
my ($class, $error, $level) = @_; |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
50
|
|
|
16
|
$level ||= 1; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
|
|
8
|
my (undef, $file, $line) = caller($level); |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
|
|
62
|
return bless { |
17
|
|
|
|
|
|
|
error => $error, |
18
|
|
|
|
|
|
|
file => $file, |
19
|
|
|
|
|
|
|
line => $line, |
20
|
|
|
|
|
|
|
}, $class; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub error { |
24
|
2
|
|
|
2
|
0
|
4
|
my ($self) = @_; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
163
|
return "'$self->{error}' at '$self->{file}' line '$self->{line}'"; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |