AuditAny/Role/Collector.pm

filter: Statementstmt 80.9% 17 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 82.1% 23 / 28 CC 1 SCAR 1.5
CC
1
Cov
81%
has_full_row_stored
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« AuditAny/Util/BuiltinDatapoints.pm ↑ Summary
1 package DBIx::Class::AuditAny::Role::Collector;
2 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # ABSTRACT: Role for all Collector classes
6  
7 12 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 12 ▶use MooX::Types::MooseLike::Base qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 DBIx::Class::AuditAny::Role::Collector - Role for all Collector classes
13  
14 =head1 DESCRIPTION
15  
16 All classes which need to be able to function as a "Collector" class must consume this
17 base role.
18  
19 =head1 REQUIRES
20  
21 =head2 record_changes
22  
23 All Collectors must implement a C<record_changes()> method. This is what is called to send
24 the change/update data into the Collector for further processing and storage.
25  
26 =cut
27 12 requires 'record_changes';
28  
29 =head1 ATTRIBUTES
30  
31 =head2 AuditObj
32  
33 Required. Reference to the main AuditAny object which is sniffing the change data
34  
35 =cut
36 12 has 'AuditObj', is => 'ro', required => 1;
37  
38 =head2 writes_bound_schema_sources
39  
40 these are part of the base class because the AuditObj expects all
41 Collectors to know if a particular tracked source is also a source used
42 by the collector which would create a deep recursion situation. in other words,
43 we don't want to try to track changes of the tables that we're using to
44 store changes. We rely on the Collector to identify these exclude cases
45 my setting those source names here
46  
47 =cut
48 2 ▶has 'writes_bound_schema_sources', is => 'ro', isa => ArrayRef[Str], lazy => 1, default => sub {[]};
Subroutine __ANON__: called CC=1 SCAR=0.0
49  
50 =head1 METHODS
51  
52 =head2 has_full_row_stored
53  
54 This is part of the "init" system for loading existing data. This is going
55 to be refactored/replaced, but with what is not yet known
56  
57 =cut
58 sub has_full_row_stored {
59 0 ▶ my $self = shift;
Subroutine has_full_row_stored: not called CC=1 SCAR=6.9
Pod documented
60 0 my $Row = shift;
61
62 0 warn "has_full_row_stored() not implemented - returning false\n";
63
64 0 return 0;
65 }
66  
67 12 1;
68  
69 __END__
70  
71 =head1 SEE ALSO
72  
73 =over
74  
75 =item *
76  
77 L<DBIx::Class::AuditAny>
78  
79 =item *
80  
81 L<DBIx::Class>
82  
83 =back
84  
85 =head1 SUPPORT
86
87 IRC:
88
89 Join #rapidapp on irc.perl.org.
90  
91 =head1 AUTHOR
92  
93 Henry Van Styn <vanstyn@cpan.org>
94  
95 =head1 COPYRIGHT AND LICENSE
96  
97 This software is copyright (c) 2012-2015 by IntelliTree Solutions llc.
98  
99 This is free software; you can redistribute it and/or modify it under
100 the same terms as the Perl 5 programming language system itself.
101  
102 =cut
« AuditAny/Util/BuiltinDatapoints.pm ↑ Summary