line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alzabo::ChangeTracker; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
656
|
use strict; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
416
|
|
4
|
|
|
|
|
|
|
|
5
|
9
|
|
|
9
|
|
47
|
use vars qw( $VERSION $STACK @CHANGES ); |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
756
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$VERSION = 2.0; |
8
|
|
|
|
|
|
|
|
9
|
9
|
|
|
9
|
|
5547
|
use Params::Validate qw( :all ); |
|
9
|
|
|
|
|
52369
|
|
|
9
|
|
|
|
|
5512
|
|
10
|
|
|
|
|
|
|
Params::Validate::validation_options( on_fail => sub { Alzabo::Exception::Params->throw( error => join '', @_ ) } ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
1; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new |
15
|
|
|
|
|
|
|
{ |
16
|
0
|
|
|
0
|
0
|
|
my $proto = shift; |
17
|
0
|
|
0
|
|
|
|
my $class = ref $proto || $proto; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
++$STACK; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $self = $STACK; |
22
|
0
|
|
|
|
|
|
bless \$self, $class; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub add |
26
|
|
|
|
|
|
|
{ |
27
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
validate_pos( @_, { type => CODEREF } ); |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
push @CHANGES, shift; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub backout |
35
|
|
|
|
|
|
|
{ |
36
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
$_->() foreach @CHANGES; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
@CHANGES = (); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub DESTROY |
44
|
|
|
|
|
|
|
{ |
45
|
0
|
|
|
0
|
|
|
--$STACK; |
46
|
|
|
|
|
|
|
|
47
|
0
|
0
|
|
|
|
|
@CHANGES = () unless $STACK; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |