line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Scraper::ISBN::Record; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
16272
|
use strict; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
229
|
|
4
|
7
|
|
|
7
|
|
27
|
use warnings; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
1678
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.03'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
9
|
|
|
|
|
|
|
# Public API |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
5
|
|
|
5
|
1
|
370
|
my $proto = shift; |
13
|
5
|
|
66
|
|
|
18
|
my $class = ref($proto) || $proto; |
14
|
5
|
|
|
|
|
17
|
my $self = { |
15
|
|
|
|
|
|
|
ISBN => undef, |
16
|
|
|
|
|
|
|
FOUND => 0, |
17
|
|
|
|
|
|
|
FOUND_IN => undef, |
18
|
|
|
|
|
|
|
BOOK => undef, |
19
|
|
|
|
|
|
|
ERROR => '', |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
5
|
|
|
|
|
11
|
bless ($self, $class); |
23
|
5
|
|
|
|
|
8
|
return $self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
8
|
|
|
8
|
1
|
229
|
sub isbn { my $self = shift; return $self->_accessor('ISBN',@_) } |
|
8
|
|
|
|
|
16
|
|
27
|
6
|
|
|
6
|
1
|
1855
|
sub found { my $self = shift; return $self->_accessor('FOUND',@_) } |
|
6
|
|
|
|
|
11
|
|
28
|
3
|
|
|
3
|
1
|
277
|
sub found_in { my $self = shift; return $self->_accessor('FOUND_IN',@_) } |
|
3
|
|
|
|
|
8
|
|
29
|
6
|
|
|
6
|
1
|
281
|
sub book { my $self = shift; return $self->_accessor('BOOK',@_) } |
|
6
|
|
|
|
|
11
|
|
30
|
6
|
|
|
6
|
1
|
277
|
sub error { my $self = shift; return $self->_accessor('ERROR',@_) } |
|
6
|
|
|
|
|
13
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _accessor { |
33
|
29
|
|
|
29
|
|
25
|
my $self = shift; |
34
|
29
|
|
|
|
|
24
|
my $accessor = shift; |
35
|
29
|
100
|
|
|
|
49
|
if (@_) { $self->{$accessor} = shift }; |
|
12
|
|
|
|
|
18
|
|
36
|
29
|
|
|
|
|
89
|
return $self->{$accessor}; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |