5 *qquote= *Data::Dumper::qquote;
12 my (undef, $file, $line) = caller;
13 ok 1, "StoreData called from $file, line $line";
15 ok ref $store eq 'HASH', "Store Data is a hash reference";
16 ok tied %$hashref, "Storing to tied hash";
18 while (my ($k, $v) = each %$store) {
19 no warnings 'uninitialized';
20 #diag "Stored [$k][$v]";
29 my $expected = shift ;
30 my %expected = %$expected;
32 my (undef, $file, $line) = caller;
33 ok 1, "VerifyData called from $file, line $line";
35 ok ref $expected eq 'HASH', "Expected data is a hash reference";
36 ok tied %$hashref, "Verifying a tied hash";
39 while (my ($k, $v) = each %$hashref) {
40 no warnings 'uninitialized';
41 if ($expected{$k} eq $v) {
42 #diag "Match " . qquote($k) . " => " . qquote($v);
43 delete $expected{$k} ;
46 #diag "No Match " . qquote($k) . " => " . qquote($v) . " want " . qquote($expected{$k});
51 if( ! ok(keys(%bad) + keys(%expected) == 0, "Expected == Actual") ) {
52 my $bad = "Expected does not match actual\n";
53 if (keys %expected ) {
54 $bad .=" No Match from Expected:\n" ;
55 while (my ($k, $v) = each %expected) {
56 $bad .= "\t" . qquote($k) . " => " . qquote($v) . "\n";
60 $bad .= "\n No Match from Actual:\n" ;
61 while (my ($k, $v) = each %bad) {
62 no warnings 'uninitialized';
63 $bad .= "\t" . qquote($k) . " => " . qquote($v) . "\n";