in reply to Tie::IxHash weird metadata?
It looks like you're using the return value from tie. You don't need to do that, Tie::IxHash modifies the behaviour of the underlying hash (or at least it appears to you program that it does) so you don't need the tied object at all. This snippet illustrates the difference.
use Tie::IxHash; use Data::Dumper; my %data; my $ref = \%data; my $tied_obj = tie(%data, 'Tie::IxHash'); $ref->{one} = 1; $ref->{two} = 2; $ref->{three} = 3; $ref->{four} = 4; print Dumper $ref; print Dumper $tied_obj;
The first print Dumps what you want. The second Dumps what you're getting.
It's usually safe to ignore the return value from tie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tie::IxHash weird metadata?
by Kjetil (Sexton) on Mar 29, 2003 at 20:35 UTC | |
by grantm (Parson) on Mar 29, 2003 at 21:16 UTC |