« blib/lib/DB/Introspector/SQLGen/Oracle/TypeMapper.pm
↑ Summary
blib/lib/DB/Introspector/SerializeUtil.pm »
| 1 | package DB::Introspector::ForeignKeyPath; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 8 | 0 | my $class = shift; | |||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 0 | ▶ | return bless([], ref($class) || $class); | ||||||||||||||||||
|
Condition0%0/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table0%0/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 11 | } | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 0 | ▶ | sub get_foreign_key_list { | ||||||||||||||||||
|
Subroutine
get_foreign_key_list: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 14 | 0 | my $self = shift; | |||||||||||||||||||
| 15 | 0 | return @$self; | |||||||||||||||||||
| 16 | } | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 0 | ▶ | sub clone { | ||||||||||||||||||
|
Subroutine
clone: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 19 | 0 | my $self = shift; | |||||||||||||||||||
| 20 | 0 | my @new_path = @$self; | |||||||||||||||||||
| 21 | 0 | ▶ | return bless(\@new_path, ref($self) || $self); | ||||||||||||||||||
|
Condition0%0/3
ref $self || $self
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table0%0/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 0 | ▶ | sub append_foreign_key { | ||||||||||||||||||
|
Subroutine
append_foreign_key: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 25 | 0 | my $self = shift; | |||||||||||||||||||
| 26 | 0 | my $foreign_key = shift; | |||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | push(@$self, $foreign_key); | |||||||||||||||||||
| 29 | } | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 0 | ▶ | sub prepend_foreign_key { | ||||||||||||||||||
|
Subroutine
prepend_foreign_key: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 32 | 0 | my $self = shift; | |||||||||||||||||||
| 33 | 0 | my $foreign_key = shift; | |||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 0 | unshift(@$self, $foreign_key); | |||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 0 | ▶ | sub append_path { | ||||||||||||||||||
|
Subroutine
append_path: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 40 | 0 | my $self = shift; | |||||||||||||||||||
| 41 | 0 | my $path = shift; | |||||||||||||||||||
| 42 | 0 | push(@$self, $path->_to_array); | |||||||||||||||||||
| 43 | } | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 0 | ▶ | sub prepend_path { | ||||||||||||||||||
|
Subroutine
prepend_path: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 46 | 0 | my $self = shift; | |||||||||||||||||||
| 47 | 0 | my $path = shift; | |||||||||||||||||||
| 48 | 0 | unshift(@$self, $path->_to_array); | |||||||||||||||||||
| 49 | } | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | 0 | ▶ | sub length { | ||||||||||||||||||
|
Subroutine
length: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 52 | 0 | my $self = shift; | |||||||||||||||||||
| 53 | 0 | return scalar(@$self); | |||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | 0 | ▶ | sub head { | ||||||||||||||||||
|
Subroutine
head: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 57 | 0 | my $self = shift; | |||||||||||||||||||
| 58 | 0 | return $self->[0]; | |||||||||||||||||||
| 59 | } | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | 0 | ▶ | sub tail { | ||||||||||||||||||
|
Subroutine
tail: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 62 | 0 | my $self = shift; | |||||||||||||||||||
| 63 | 0 | return $self->[$#$self]; | |||||||||||||||||||
| 64 | } | ||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | 0 | ▶ | sub _to_array { | ||||||||||||||||||
|
Subroutine
_to_array: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 67 | 0 | my $self = shift; | |||||||||||||||||||
| 68 | 0 | return @$self; | |||||||||||||||||||
| 69 | } | ||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 0 | ▶ | sub head_table { | ||||||||||||||||||
|
Subroutine
head_table: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 72 | 0 | my $self = shift; | |||||||||||||||||||
| 73 | 0 | ▶ | return ($self->head->is_dependency) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 74 | ? $self->head->local_table : $self->head->foreign_table; | ||||||||||||||||||||
| 75 | } | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | 0 | ▶ | sub head_columns { | ||||||||||||||||||
|
Subroutine
head_columns: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 78 | 0 | my $self = shift; | |||||||||||||||||||
| 79 | 0 | $self->head->foreign_column_names; | |||||||||||||||||||
| 80 | } | ||||||||||||||||||||
| 81 | |||||||||||||||||||||
| 82 | 0 | ▶ | sub tail_table { | ||||||||||||||||||
|
Subroutine
tail_table: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 83 | 0 | my $self = shift; | |||||||||||||||||||
| 84 | 0 | ▶ | return ($self->tail->is_dependency) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 85 | ? $self->tail->foreign_table : $self->tail->local_table; | ||||||||||||||||||||
| 86 | } | ||||||||||||||||||||
| 87 | |||||||||||||||||||||
| 88 | 0 | ▶ | sub tail_columns { | ||||||||||||||||||
|
Subroutine
tail_columns: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 89 | 0 | my $self = shift; | |||||||||||||||||||
| 90 | 0 | $self->tail->local_column_names; | |||||||||||||||||||
| 91 | } | ||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | 1 | 1; | |||||||||||||||||||