On Dec 12, 2007 10:11 AM, Roman Daszczyszak <[EMAIL PROTECTED]> wrote:
> Oops.. I made one mistake in my explanation. The structure in
> question is a hash of usernames each containing another hash of the
> user attributes. I'm trying to use the code to ignore an attribute in
> the second-level hash.
>
> Will that work?
snip
The docs don't seem very clear on the point, so, again, your best bet
is to write a quick test to see what happens:
#!/usr/bin/perl
use strict;
use warnings;
use Data::Compare;
my %a = (foo => 10, bar => { a => 1 }, baz => 4);
my %b = (foo => 10, bar => { a => 2 }, baz => 5);
print "got ", Compare(\%a, \%b, {ignore_hash_keys => [qw<baz>]}),
" with qw<baz>\n";
print "got ", Compare(\%a, \%b, {ignore_hash_keys => [qw<a baz>]}),
" with qw<a baz>\n";
This seems to show that it does ignore the keys at every level of the hashes.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/