AuditAny/Collector/Code.pm

filter: Statementstmt 88.2% 15 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 86.9% 20 / 23 CC 1 SCAR 1.8
CC
1
Cov
88%
record_changes
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« AuditAny/Role/Schema.pm ↑ Summary AuditAny/Util/BuiltinDatapoints.pm »
1 package # Hide from PAUSE
2 DBIx::Class::AuditAny::Collector::Code;
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # ABSTRACT: Coderef collector
7  
8 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use MooX::Types::MooseLike::Base qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 with 'DBIx::Class::AuditAny::Role::Collector';
11  
12 =head1 NAME
13  
14 DBIx::Class::AuditAny::Collector::Code - Simple CodeRef collector class
15  
16 =head1 DESCRIPTION
17  
18 Using this collector class you can supply a coderef, and it will receive the
19 C<record_changes> data as arguments. This allows you to handle the change data
20 in whatever manner you choose.
21  
22 =head1 ATTRIBUTES
23  
24 =head2 collect_coderef
25  
26 Required. Any valid CodeRef to use to send change data to. Arguments will be
27 supplied in the same form as C<record_changes()>
28  
29 =cut
30  
31 2 has 'collect_coderef', is => 'ro', isa => CodeRef, required => 1;
32  
33  
34 =head1 METHODS
35  
36 =head2 record_changes
37  
38 =cut
39 sub record_changes {
40 0 ▶ my $self = shift;
Subroutine record_changes: not called CC=1 SCAR=6.9
Pod documented
41 0 return $self->collect_coderef->(@_);
42 }
43  
44  
45 2 1;
46  
47 __END__
48  
49 =head1 SEE ALSO
50  
51 =over
52  
53 =item *
54  
55 L<DBIx::Class::AuditAny>
56  
57 =item *
58  
59 L<DBIx::Class>
60  
61 =back
62  
63 =head1 SUPPORT
64
65 IRC:
66
67 Join #rapidapp on irc.perl.org.
68  
69 =head1 AUTHOR
70  
71 Henry Van Styn <vanstyn@cpan.org>
72  
73 =head1 COPYRIGHT AND LICENSE
74  
75 This software is copyright (c) 2012-2015 by IntelliTree Solutions llc.
76  
77 This is free software; you can redistribute it and/or modify it under
78 the same terms as the Perl 5 programming language system itself.
79  
80 =cut
« AuditAny/Role/Schema.pm ↑ Summary AuditAny/Util/BuiltinDatapoints.pm »