File Coverage

blib/lib/SQL/Concrete/Dollars.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 1 1 100.0
total 31 31 100.0


line stmt bran cond sub pod time code
1 1     1   529 use 5.006; use strict; use warnings;
  1     1   3  
  1     1   4  
  1         2  
  1         15  
  1         4  
  1         2  
  1         52  
2              
3             package SQL::Concrete::Dollars;
4              
5             our $VERSION = '1.004';
6              
7 1     1   16 use SQL::Concrete ':noncore';
  1         3  
  1         4  
8 1     1   262 BEGIN { our @ISA = 'SQL::Concrete' } # inherit import()
9              
10 3     3 1 1629 sub sql_render { SQL::Concrete::Renderer::Dollars->new->render( @_ ) }
11              
12             package SQL::Concrete::Renderer::Dollars;
13              
14             our $VERSION = '1.004';
15              
16 1     1   115 BEGIN { our @ISA = 'SQL::Concrete::Renderer' }
17              
18             sub render {
19 3     3   6 my $self = shift;
20 3         8 local $self->{'placeholder_id'} = 0;
21 3         9 $self->SUPER::render( @_ );
22             }
23              
24             sub render_bind {
25 8     8   10 my $self = shift;
26 8         10 push @{ $self->{'bind'} }, $_[0];
  8         14  
27 8         26 '$'.++$self->{'placeholder_id'};
28             }
29              
30             1;
31              
32             __END__