DBomb/Query/Text.pm

filter: Statementstmt 85.1% 23 / 27 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 50.0% 1 / 2 totaltotal 81.5% 31 / 38 CC 2 SCAR 3.3
CC
2
Cov
83%
init
2.0
sql
2.0
BEGIN
1.0
CRAP 1.4
« DBomb/Version.pm ↑ Summary DBomb/Value/Key.pm »
1 package DBomb::Query::Text;
2  
3 =head1 NAME
4  
5 DBomb::Query::Text - Just a wrapper around plain sql.
6  
7 =cut
8  
9 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 12 our $VERSION = '$Revision: 1.6 $';
12  
13 12 ▶use Carp::Assert;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 12 ▶use DBomb::Util qw(ctx_0);
Subroutine BEGIN: called CC=1 SCAR=0.0
15 use Class::MethodMaker
16 12 ▶ 'new_with_init' => 'new',
Subroutine BEGIN: called CC=1 SCAR=0.0
17 'get_set' => [qw(text bind_values)],
18 12 ;
19  
20 sub init
21 6 ▶{
Subroutine init: called CC=2 SCAR=7.1
Pod undocumented
22 6 my ($self, $text, @bind_values) = @_;
23  
24 6 assert(UNIVERSAL::isa($self,__PACKAGE__));
25 6 assert(defined($text),'valid parameters');
26  
27 6 $self->text($text);
28 6 $self->bind_values([]);
29 0 ▶ push @{$self->bind_values},@bind_values if @bind_values;
Branch: 1 branch
BranchTrueFalseTotal
if @bind_values 0 6 6
30 }
31  
32 sub sql
33 0 ▶{
Subroutine sql: not called CC=1 SCAR=6.9
Pod documented
34 0 my ($self, $dbh) = @_;
35 0 return ctx_0($self->text, @{$self->bind_values});
36 }
37  
38  
39 12 1;
40 __END__
« DBomb/Version.pm ↑ Summary DBomb/Value/Key.pm »