line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Iterator::File::State::Interface; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
## $Id: Interface.pm,v 1.5 2008/06/17 06:00:28 wdr1 Exp $ |
4
|
|
|
|
|
|
|
|
5
|
5
|
|
|
5
|
|
3012
|
use 5.006; |
|
5
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
221
|
|
6
|
5
|
|
|
5
|
|
26
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
138
|
|
7
|
5
|
|
|
5
|
|
23
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
116
|
|
8
|
|
|
|
|
|
|
|
9
|
5
|
|
|
5
|
|
39
|
use Iterator::File::Utility; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
36
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @ISA = qw(Iterator::File::Utility); |
12
|
|
|
|
|
|
|
our $VERSION = substr(q$Revision: 1.5 $, 10); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our %default_config = |
15
|
|
|
|
|
|
|
( |
16
|
|
|
|
|
|
|
'update_frequency' => 1, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
10
|
|
|
10
|
1
|
43
|
my ($class, %config) = @_; |
23
|
|
|
|
|
|
|
|
24
|
10
|
|
|
|
|
67
|
%config = (%default_config, %config); |
25
|
10
|
|
|
|
|
70
|
my $self = $class->SUPER::new( %config ); |
26
|
10
|
|
|
|
|
30
|
bless($self, $class); |
27
|
|
|
|
|
|
|
|
28
|
10
|
|
|
|
|
37
|
return $self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub initialize { |
34
|
6
|
|
|
6
|
1
|
10
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
6
|
|
|
|
|
21
|
$self->{'marker'} = 0; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub advance_marker { |
42
|
39
|
|
|
39
|
1
|
39
|
my ($self) = @_; |
43
|
|
|
|
|
|
|
|
44
|
39
|
|
|
|
|
76
|
return $self->set_marker( $self->marker() + 1 ); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub marker { |
50
|
29
|
|
|
29
|
1
|
28
|
my $self = shift; |
51
|
|
|
|
|
|
|
|
52
|
29
|
|
|
|
|
103
|
return $self->{'marker'}; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub set_marker { |
58
|
29
|
|
|
29
|
1
|
32
|
my $self = shift; |
59
|
29
|
|
|
|
|
26
|
my $num = shift; |
60
|
|
|
|
|
|
|
|
61
|
29
|
|
|
|
|
66
|
$self->{'marker'} = $num; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
4
|
|
|
4
|
1
|
9
|
sub finish {} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
__END__ |