Romani/Query/Select/Join.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 37 CC 2 SCAR 11.5
CC
2
Cov
0%
new
6.0
get_type
2.0
get_table
2.0
CRAP 3.1
1  
2 package DBIx::Romani::Query::Select::Join;
3  
4 use strict;
5  
6 sub new
7 {
8 my $class = shift;
9 my $args = shift;
10  
11 my $type;
12 my $table_name;
13 my $on;
14  
15 if ( ref($args) eq 'HASH' )
16 {
17 $type = $args->{type};
18 $table_name = $args->{table};
19 $on = $args->{on};
20 }
21 else
22 {
23 $type = $args;
24 $table_name = shift;
25 $on = shift;
26 }
27  
28 my $self = {
29 type => $type,
30 table_name => $table_name,
31 on => $on,
32 };
33  
34 bless $self, $class;
35 return $self;
36 }
37  
38 sub get_type { return shift->{type}; }
39 sub get_table { return shift->{table_name}; }
40 sub get_on { return shift->{on}; }
41  
42 sub clone
43 {
44 my $self = shift;
45  
46 my $args = {
47 type => $self->get_type(),
48 table => $self->get_table(),
49 on => $self->get_on()
50 };
51  
52 return DBIx::Romani::Query::Select::Join->new($args);
53 }
54  
55 1;
56