File Coverage

blib/lib/DBIx/Romani/Query/SQL/TTT/Keyword.pm
Criterion Covered Total %
statement 3 17 17.6
branch 0 2 0.0
condition n/a
subroutine 1 5 20.0
pod 0 4 0.0
total 4 28 14.2


line stmt bran cond sub pod time code
1              
2             package DBIx::Romani::Query::SQL::TTT::Keyword;
3              
4 1     1   6 use strict;
  1         2  
  1         245  
5              
6             sub new
7             {
8 0     0 0   my $class = shift;
9 0           my $args = shift;
10              
11 0           my $keyword;
12              
13 0 0         if ( ref($args) eq 'HASH' )
14             {
15 0           $keyword = $args->{keyword};
16             }
17             else
18             {
19 0           $keyword = $args;
20             }
21              
22 0           my $self = {
23             keyword => $keyword,
24             };
25              
26 0           bless $self, $class;
27 0           return $self;
28             }
29              
30 0     0 0   sub get_keyword { return shift->{keyword}; }
31              
32             sub visit
33             {
34 0     0 0   my ($self, $visitor) = (shift, shift);
35 0           return $visitor->visit_ttt_keyword( $self, @_ );
36             }
37              
38             sub clone
39             {
40 0     0 0   my $self = shift;
41              
42 0           return DBIx::Romani::Query::SQL::TTT::Keyword->new({ keyword => $self->get_keyword() });
43             }
44              
45             1;
46