| 1 | 1 | ▶ | use 5.006; use strict; use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | |||||||||||
| 3 | package DBIx::Simple::Interpol; | ||||||||||
| 4 | |||||||||||
| 5 | 1 | our $VERSION = '1.007'; | |||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use SQL::Interpol (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use DBIx::Simple (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | shift; | |||||||||
| 12 | 1 | my $prelude = sprintf qq'package %s;\n#line %d "%s"\n', ( caller )[0,2,1]; | |||||||||
| 13 | 1 | my $sub = eval qq{ sub { $prelude SQL::Interpol->import(\@_) } }; | |||||||||
| 14 | 1 | &$sub; | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | 1 | ▶ | sub iquery { | ||||||||
|
Subroutine
iquery: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 18 | 1 | my $self = shift; | |||||||||
| 19 | 1 | my $p = SQL::Interpol::Parser->new; | |||||||||
| 20 | 1 | my $sql = $p->parse( @_ ); | |||||||||
| 21 | 1 | $self->query( $sql, @{ $p->bind } ); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 1 | ▶ | die 'Cannot find method to patch' if not DBIx::Simple->can( 'iquery' ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | 1 | ▶ | do { no warnings 'redefine'; *DBIx::Simple::iquery = \&iquery }; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | |||||||||||
| 28 | __END__ | ||||||||||