90 |
diag " row $pos => ",Dumper($row) if ($debug); |
diag " row $pos => ",Dumper($row) if ($debug); |
91 |
|
|
92 |
my $t = time(); |
my $t = time(); |
93 |
|
ok(my $ds = $n->data_structure($row), "XML data_structure"); |
|
ok(my $ds = $n->data_structure($row), "data_structure"); |
|
|
|
|
94 |
$t1 += time() - $t; |
$t1 += time() - $t; |
95 |
|
|
96 |
diag " ds $pos => ",Dumper($ds) if ($debug); |
diag " ds $pos => ",Dumper($ds) if ($debug); |
97 |
|
|
98 |
$t = time(); |
$t = time(); |
99 |
my $ds2; |
ok( my $ds2 = WebPAC::Normalize::Set::data_structure( |
100 |
|
lookup => $lookup->lookup_hash, |
101 |
# TODO move somewhere |
row => $row, |
102 |
{ |
rules => $norm_pl, |
103 |
no strict 'subs'; |
), "Set data_structure"); |
|
use WebPAC::Normalize::Set; |
|
|
set_lookup( $lookup->lookup_hash ); |
|
|
set_rec( $row ); |
|
|
clean_ds(); |
|
|
eval "$norm_pl"; |
|
|
ok(! $@, $@ ? "error: $@" : "no error"); |
|
|
ok($ds2 = get_ds(), "get_ds"); |
|
|
|
|
|
} |
|
|
|
|
104 |
$t2 += time() - $t; |
$t2 += time() - $t; |
105 |
|
|
106 |
diag " ds2 $pos => ",Dumper($ds2) if ($debug); |
diag " ds2 $pos => ",Dumper($ds2) if ($debug); |