DDL/CloneClear.pm

filter: Statementstmt 72.7% 16 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 2 / 2 totaltotal 74.1% 23 / 31 CC 2 SCAR 8.6
CC
2
Cov
73%
clone_simple
6.0
clone
2.0
BEGIN
1.0
CRAP 2.4
« DDL.pm ↑ Summary DDL/Constants.pm »
1 package CXC::DB::DDL::CloneClear;
2  
3 # ABSTRACT: Provide attribute tags and a method for Moo objects to indicate they should be cloned
4  
5 10 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 10 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 10 ▶use MooX::TaggedAttributes -propagate, -tags => 'cloneclear';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 10 ▶use experimental 'signatures', 'postderef';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 10 ▶use namespace::clean -except => [ '_tag_list', '_tags' ];
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 10 our $VERSION = '0.21';
15  
16  
17  
18  
19  
20  
21  
22  
23  
24 0 ▶sub clone ( $self ) {
Subroutine clone: not called CC=1 SCAR=6.9
Pod documented
25 0 require Clone;
26 0 Clone::clone( $self );
27 }
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42 0 ▶sub clone_simple ( $self ) {
Subroutine clone_simple: not called CC=2 SCAR=17.9
Pod documented
43 0 my $clone = $self->clone;
44 0 $clone->$_ for map { "clear_$_" } keys $self->_tags->{cloneclear}->%*;
45 0 return $clone;
46 }
47  
48 10 1;
49  
50 #
51 # This file is part of CXC-DB-DDL
52 #
53 # This software is Copyright (c) 2022 by Smithsonian Astrophysical Observatory.
54 #
55 # This is free software, licensed under:
56 #
57 # The GNU General Public License, Version 3, June 2007
58 #
59  
60 __END__
« DDL.pm ↑ Summary DDL/Constants.pm »