line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: ErrorHandler.pm,v 1.1 2003/09/08 00:00:50 btrott Exp $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package XML::Atom::ErrorHandler; |
4
|
23
|
|
|
23
|
|
197
|
use strict; |
|
23
|
|
|
|
|
58
|
|
|
23
|
|
|
|
|
775
|
|
5
|
|
|
|
|
|
|
|
6
|
23
|
|
|
23
|
|
128
|
use vars qw( $ERROR ); |
|
23
|
|
|
|
|
42
|
|
|
23
|
|
|
|
|
4984
|
|
7
|
|
|
|
|
|
|
|
8
|
0
|
|
|
0
|
0
|
|
sub new { bless {}, shift } |
9
|
|
|
|
|
|
|
sub error { |
10
|
0
|
|
0
|
0
|
0
|
|
my $msg = $_[1] || ''; |
11
|
0
|
0
|
|
|
|
|
$msg .= "\n" unless $msg =~ /\n$/; |
12
|
0
|
0
|
|
|
|
|
if (ref($_[0])) { |
13
|
0
|
|
|
|
|
|
$_[0]->{_errstr} = $msg; |
14
|
|
|
|
|
|
|
} else { |
15
|
0
|
|
|
|
|
|
$ERROR = $msg; |
16
|
|
|
|
|
|
|
} |
17
|
0
|
|
|
|
|
|
return; |
18
|
|
|
|
|
|
|
} |
19
|
0
|
0
|
|
0
|
0
|
|
sub errstr { ref($_[0]) ? $_[0]->{_errstr} : $ERROR } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |