Object/Metadata/UniqueKey.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 3 totaltotal 57.5% 19 / 33 CC 2 SCAR 9.2
CC
2
Cov
65%
init_name
6.0
perl_array_definition
2.0
perl_object_definition
2.0
CRAP 2.5
« Object/Metadata/Column/Float.pm ↑ Summary Object/Metadata/Column/BigSerial.pm »
1 package Rose::DB::Object::Metadata::UniqueKey;
2  
3 61 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 61 ▶use Rose::DB::Object::Metadata::Util qw(perl_quote_value);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 61 ▶use Rose::DB::Object::Metadata::ColumnList;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 61 our @ISA = qw(Rose::DB::Object::Metadata::ColumnList);
9  
10 61 our $VERSION = '0.782';
11  
12 use Rose::Object::MakeMethods::Generic
13 61 ▶(
Subroutine BEGIN: called CC=1 SCAR=0.0
14 61 'scalar --get_set_init' =>
15 [
16 'name'
17 ],
18  
19 boolean => 'has_predicate',
20 61 );
21  
22 0 ▶sub init_name { join('_', shift->column_names) || undef }
Subroutine init_name: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
join "_", (shift())->column_names or undef 0 0 0
23  
24 sub perl_array_definition
25 0 ▶{
Subroutine perl_array_definition: not called CC=1 SCAR=6.9
Pod undocumented
26 0 '[ ' . join(', ', map { perl_quote_value($_) } shift->column_names) . ' ]'
27 }
28  
29 sub perl_object_definition
30 0 ▶{
Subroutine perl_object_definition: not called CC=1 SCAR=6.9
Pod undocumented
31 0 my($self) = shift;
32  
33 return ref($self) . '->new(name => ' . perl_quote_value($self->name) .
34 ', columns => [ ' .
35 0 join(', ', map { perl_quote_value($_) } $self->column_names) . ' ])';
36 }
37  
38 61 1;
39  
40 __END__
« Object/Metadata/Column/Float.pm ↑ Summary Object/Metadata/Column/BigSerial.pm »