29 |
sub as_sponge { |
sub as_sponge { |
30 |
my ( $self ) = @_; |
my ( $self ) = @_; |
31 |
|
|
32 |
|
warn "# dsn: ", $self->dsn; |
33 |
my $dbh = DBI->connect( $self->dsn, '', '', { RaiseError => 1 } ) || die $DBI::errstr; |
my $dbh = DBI->connect( $self->dsn, '', '', { RaiseError => 1 } ) || die $DBI::errstr; |
34 |
$dbh->do( qq{ set client_encoding='utf-8' } ); |
$dbh->do( qq{ set client_encoding='utf-8' } ); |
35 |
|
|
36 |
|
warn "# query: ", $self->query; |
37 |
my $sth = $dbh->prepare( $self->query ); |
my $sth = $dbh->prepare( $self->query ); |
38 |
$sth->execute(); |
$sth->execute(); |
39 |
|
|