line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBICx::Hooks; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
262754
|
$DBICx::Hooks::VERSION = '0.003'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Provide hooks into DBIx::Class create()/update()/delete() |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
9
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
9
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
10
|
1
|
|
|
1
|
|
15
|
use DBICx::Hooks::Registry; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
223
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub insert { |
13
|
2
|
|
|
2
|
1
|
19461
|
my $self = shift; |
14
|
2
|
|
|
|
|
14
|
my $ret = $self->next::method(@_); |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
|
|
4164
|
$_->($self) for dbic_hooks_for($self, 'create'); |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
63
|
$ret; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub update { |
23
|
2
|
|
|
2
|
1
|
4936
|
my $self = shift; |
24
|
2
|
|
|
|
|
12
|
my $ret = $self->next::method(@_); |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
4298
|
$_->($self) for dbic_hooks_for($self, 'update'); |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
13
|
$ret; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub delete { |
33
|
2
|
|
|
2
|
1
|
5255
|
my $self = shift; |
34
|
2
|
|
|
|
|
10
|
my $ret = $self->next::method(@_); |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
16098
|
$_->($self) for dbic_hooks_for($self, 'delete'); |
37
|
|
|
|
|
|
|
|
38
|
2
|
|
|
|
|
10
|
$ret; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |