diag " row $pos => ",Dumper($row) if ($debug);
my $t = time();
-
- ok(my $ds = $n->data_structure($row), "data_structure");
-
+ ok(my $ds = $n->data_structure($row), "XML data_structure");
$t1 += time() - $t;
diag " ds $pos => ",Dumper($ds) if ($debug);
$t = time();
- my $ds2;
-
- # TODO move somewhere
- {
- no strict 'subs';
- 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");
-
- }
-
+ ok( my $ds2 = WebPAC::Normalize::Set::data_structure(
+ lookup => $lookup->lookup_hash,
+ row => $row,
+ rules => $norm_pl,
+ ), "Set data_structure");
$t2 += time() - $t;
diag " ds2 $pos => ",Dumper($ds2) if ($debug);