}
if ( defined $hash_col ) {
map {
- $_->[$hash_col] = eval '{ ' . $_->[$hash_col] . ' }';
+ my $hash = $_->[$hash_col];
+ $hash =~ s/\@/\\\@/g;
+ $_->[$hash_col] = eval "{ $hash }";
+ $_->[$hash_col] = "ERROR: $@ for $hash" if $@;
} @$rows
}
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 12;
use Data::Dump qw(dump);
use lib 'lib';
ok exists $r->{error}, 'error';
diag dump($r);
-ok my $r = $o->sql('job', "select * from cpe_Davolink limit 1"), 'cpe_Davolink';
-ok( $r->{hash_col}, 'hash_col' );
-isa_ok $r->{rows}->[0]->[ $r->{hash_col} ], 'HASH', 'hstore column';
-diag dump $r;
+foreach my $cpe_table ( qw(cpe_Davolink cpe_EasyGateway) ) {
+
+ diag $cpe_table;
+ ok my $r = $o->sql('job', "select * from $cpe_table limit 1"), $cpe_table;
+ ok( $r->{hash_col}, 'hash_col' );
+ isa_ok $r->{rows}->[0]->[ $r->{hash_col} ], 'HASH', 'hstore column';
+ diag "$cpe_table ",dump $r;
+
+}