line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package EventStore::Tiny::Snapshot; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
623
|
use strict; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
148
|
|
4
|
7
|
|
|
7
|
|
27
|
use warnings; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
373
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Class::Tiny { |
7
|
1
|
|
|
|
|
11
|
state => sub {die "state is required.\n"}, |
8
|
1
|
|
|
|
|
8
|
timestamp => sub {die "timestamp is required.\n"}, |
9
|
7
|
|
|
7
|
|
412
|
}; |
|
7
|
|
|
|
|
1323
|
|
|
7
|
|
|
|
|
194
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub BUILD { |
12
|
40
|
|
|
40
|
0
|
8656
|
my $self = shift; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Check non-lazy |
15
|
40
|
|
|
|
|
588
|
$self->state; |
16
|
39
|
|
|
|
|
640
|
$self->timestamp; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Return nothing (will be ignored anyway) |
19
|
38
|
|
|
|
|
180
|
return; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=pod |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=encoding utf-8 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
EventStore::Tiny::Snapshot |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 REFERENCE |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
EventStore::Tiny::Snapshot implements the following attributes and methods. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 state |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $state_hr = $snapshot->state; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Returns the hashref representing the state of this snapshot. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 timestamp |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $timestamp = $snapshot->timestamp; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Returns a timestamp representing the time this snapshot was created. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 SEE ALSO |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
L |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Copyright (c) 2018 Mirko Westermeier (mail: mirko@westermeier.de) |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Released under the MIT License (see LICENSE.txt for details). |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |