18 |
throws_ok { new WebPAC::Normalize::XML( lookup_regex => 'foo' ) } qr/pair/, "lookup_regex without lookup"; |
throws_ok { new WebPAC::Normalize::XML( lookup_regex => 'foo' ) } qr/pair/, "lookup_regex without lookup"; |
19 |
throws_ok { new WebPAC::Normalize::XML( lookup => 'bar' ) } qr/pair/, "lookup without lookup_regex"; |
throws_ok { new WebPAC::Normalize::XML( lookup => 'bar' ) } qr/pair/, "lookup without lookup_regex"; |
20 |
|
|
21 |
ok(my $n = new WebPAC::Normalize::XML( debug => 0 ), "new"); |
ok(my $n = new WebPAC::Normalize::XML( |
22 |
|
debug => 1, |
23 |
|
filter => { |
24 |
|
regex => sub { |
25 |
|
my ($val, $regex) = @_; |
26 |
|
eval "\$val =~ $regex"; |
27 |
|
return $val; |
28 |
|
}, |
29 |
|
}, |
30 |
|
), "new"); |
31 |
|
|
32 |
throws_ok { $n->open() } qr/tag/, "open without tag"; |
throws_ok { $n->open() } qr/tag/, "open without tag"; |
33 |
throws_ok { $n->open( tag => 'isis' ) } qr/xml_file/, "open without xml_file"; |
throws_ok { $n->open( tag => 'isis' ) } qr/xml_file/, "open without xml_file"; |
140 |
|
|
141 |
ok(my $ds = $n->data_structure( $rec ), "data_structure"); |
ok(my $ds = $n->data_structure( $rec ), "data_structure"); |
142 |
|
|
143 |
diag Dumper($rec, $ds); |
#diag Dumper($rec, $ds); |
144 |
|
|