lib/DBIx/ActiveRecord/Arel/Column.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 3 totaltotal 80.6% 25 / 31 CC 3 SCAR 6.2
CC
3
Cov
95%
name
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« lib/DBIx/ActiveRecord/Arel/Query.pm ↑ Summary lib/DBIx/ActiveRecord/Arel/Query/Update.pm »
1 package DBIx::ActiveRecord::Arel::Column;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 our $USE_FULL_NAME = 0;
6 2 our $AS = {};
7  
8 119 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
9 119 my ($self, $table, $column) = @_;
10 119 bless {table => $table, column => $column}, $self;
11 }
12  
13 153 ▶sub table {shift->{table}}
Subroutine table: called CC=1 SCAR=0.0
Pod undocumented
14  
15 121 ▶sub name {
Subroutine name: called CC=3 SCAR=11.0
Pod undocumented
16 121 my $self = shift;
17 121 ▶ if ($USE_FULL_NAME) {
Branch: 1 branch
BranchTrueFalseTotal
if ($DBIx::ActiveRecord::Arel::Column::USE_FULL_NAME) { } 69 52 121
18 69 ▶ ($AS->{$self->table->table}||$self->table->table).'.'.$self->{column};
Condition66%2/3
$$DBIx::ActiveRecord::Arel::Column::AS{$self->table->table} || $self->table->table
l!l&&r!l&&!r
3660
MC/DC0%0/2
$$DBIx::ActiveRecord::Arel::Column::AS{$self->table->table} || $self->table->table
$$DBIx::ActiveRecord::Arel::Column::AS{$self->table->table} $self->table->table
Truth table66%2/3
A || B
A= $$DBIx::ActiveRecord::Arel::Column::AS{$self->table->table}B= $self->table->table
ABresult
1X1
011
000
19 } else {
20 52 $self->{column};
21 }
22 }
23  
24 2 1;
« lib/DBIx/ActiveRecord/Arel/Query.pm ↑ Summary lib/DBIx/ActiveRecord/Arel/Query/Update.pm »