line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Error ; |
2
|
|
|
|
|
|
|
$VERSION = 2.41 ; |
3
|
1
|
|
|
1
|
|
76077
|
use strict ; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
26
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# This file uses the "Perlish" coding style |
6
|
|
|
|
|
|
|
# please read http://perl.4pro.net/perlish_coding_style.html |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
; use Carp |
9
|
1
|
|
|
1
|
|
5
|
; $Carp::Internal{+__PACKAGE__}++ |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
71
|
|
10
|
|
|
|
|
|
|
|
11
|
6
|
|
|
6
|
|
2764
|
; use overload bool => sub { $_[0][2] } |
12
|
1
|
|
|
|
|
7
|
, fallback => 1 |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
974
|
; sub new # class, error, errnum, false |
|
1
|
|
|
|
|
863
|
|
15
|
4
|
|
|
4
|
1
|
1034
|
{ my $c = shift |
16
|
4
|
100
|
|
|
|
145
|
; $_[2] and croak "'$_[2]' is not a false value, died" |
17
|
3
|
|
|
|
|
5
|
; ($Class::Error::error, $Class::Error::errnum) = @_ |
18
|
3
|
|
|
|
|
9
|
; bless \ @_, $c |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
2
|
100
|
|
2
|
1
|
9
|
; sub error { ref $_[0] ? $_[0][0] : $Class::Error::error } |
22
|
2
|
100
|
|
2
|
1
|
377
|
; sub errnum { ref $_[0] ? $_[0][1] : $Class::Error::errnum } |
23
|
|
|
|
|
|
|
|
24
|
9
|
|
|
9
|
|
509
|
; sub AUTOLOAD { $_[0] } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
; 1 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |