line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package # Hide from PAUSE |
2
|
|
|
|
|
|
|
DBIx::Class::AuditAny::AuditContext; |
3
|
14
|
|
|
14
|
|
8422
|
use strict; |
|
14
|
|
|
|
|
41
|
|
|
14
|
|
|
|
|
515
|
|
4
|
14
|
|
|
14
|
|
108
|
use warnings; |
|
14
|
|
|
|
|
33
|
|
|
14
|
|
|
|
|
375
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Base class for context objects in DBIx::Class::AuditAny |
7
|
|
|
|
|
|
|
|
8
|
14
|
|
|
14
|
|
81
|
use Moo; |
|
14
|
|
|
|
|
40
|
|
|
14
|
|
|
|
|
90
|
|
9
|
14
|
|
|
14
|
|
22539
|
use MooX::Types::MooseLike::Base qw(:all); |
|
14
|
|
|
|
|
47
|
|
|
14
|
|
|
|
|
11148
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
DBIx::Class::AuditAny::AuditContext - Base class for context objects in DBIx::Class::AuditAny |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
This class is used internally and typically does not need to be called directly |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 AuditObj |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Required. Reference to the Auditor object (L<DBIx::Class::AuditAny>). |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
has 'AuditObj', is => 'ro', isa => InstanceOf['DBIx::Class::AuditAny'], required => 1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 tiedContexts |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Used internally |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
has 'tiedContexts', is => 'lazy', isa => ArrayRef[Object];#, lazy_build => 1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 local_datapoint_data |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Used internally |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
has 'local_datapoint_data', is => 'lazy', isa => HashRef;#, lazy_build => 1; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
|
0
|
sub _build_tiedContexts { die "Virtual method" } |
43
|
0
|
|
|
0
|
|
0
|
sub _build_local_datapoint_data { die "Virtual method" } |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 METHODS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 get_datapoint_value |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
sub get_datapoint_value { |
52
|
1345
|
|
|
1345
|
1
|
2110
|
my $self = shift; |
53
|
1345
|
|
|
|
|
2021
|
my $name = shift; |
54
|
1345
|
|
|
|
|
1939
|
my @Contexts = ($self,@{$self->tiedContexts},$self->AuditObj); |
|
1345
|
|
|
|
|
20642
|
|
55
|
1345
|
|
|
|
|
36353
|
foreach my $Context (@Contexts) { |
56
|
|
|
|
|
|
|
return $Context->local_datapoint_data->{$name} |
57
|
1613
|
100
|
|
|
|
34439
|
if (exists $Context->local_datapoint_data->{$name}); |
58
|
|
|
|
|
|
|
} |
59
|
0
|
|
|
|
|
0
|
die "Unknown datapoint '$name'"; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 get_datapoints_data |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
65
|
|
|
|
|
|
|
sub get_datapoints_data { |
66
|
388
|
|
|
388
|
1
|
3599
|
my $self = shift; |
67
|
388
|
50
|
|
|
|
1070
|
my @names = (ref($_[0]) eq 'ARRAY') ? @{ $_[0] } : @_; # <-- arg as array or arrayref |
|
388
|
|
|
|
|
1179
|
|
68
|
388
|
|
|
|
|
772
|
return { map { $_ => $self->get_datapoint_value($_) } @names }; |
|
1345
|
|
|
|
|
35296
|
|
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 SchemaObj |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
75
|
1
|
|
|
1
|
1
|
25
|
sub SchemaObj { (shift)->AuditObj->schema }; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 schema |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
0
|
|
|
0
|
1
|
0
|
sub schema { ref (shift)->AuditObj->schema }; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 primary_key_separator |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
87
|
28
|
|
|
28
|
1
|
203
|
sub primary_key_separator { (shift)->AuditObj->primary_key_separator }; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 get_context_datapoints |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
415
|
|
|
415
|
1
|
1627
|
sub get_context_datapoints { (shift)->AuditObj->get_context_datapoints(@_) }; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 get_context_datapoint_names |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
3
|
|
|
3
|
1
|
29
|
sub get_context_datapoint_names { (shift)->AuditObj->get_context_datapoint_names(@_) }; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 get_dt |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |
105
|
194
|
|
|
194
|
1
|
1076
|
sub get_dt { (shift)->AuditObj->get_dt(@_) }; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
__END__ |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 SEE ALSO |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=over |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item * |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
L<DBIx::Class::AuditAny> |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item * |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
L<DBIx::Class> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=back |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 SUPPORT |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
IRC: |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Join #rapidapp on irc.perl.org. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 AUTHOR |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Henry Van Styn <vanstyn@cpan.org> |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
This software is copyright (c) 2012-2015 by IntelliTree Solutions llc. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
140
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=cut |