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