I'm working on an AxKit Provider, and I'm creating data structures of threaded comments. To get the comments in the right order, I'm using Tie::IxHash.
I have the following code:
warn ("this comment: " . Dumper(${$comments}{$key})); my $comment = Tie::IxHash->new(${$comments}{$key}); warn ("comment: " . Dumper($comment));
where the two warnings are merely for debugging. When I dump the first ${$comments}{$key}, it results in the following output (in my Apache error log):
this comment: $VAR1 = { 'title' => 'Kommentarens tittel 5', 'content' => 'Dette er kommentar fem', 'user' => { 'username' => 'bamse', 'name' => '' }, 'storyname' => 'test1', 'timestamp' => '2003-03-07 00:00:00+01', 'sectionid' => 'tester', 'commentpath' => '/bamse' };
Then, I've tied it up, and the second dump results in this dump:
comment: $VAR1 = bless( [ { 'HASH(0x85380bc)' => 0 }, [ { 'title' => 'Kommentarens tittel 5', 'content' => 'Dette er kommentar fem', 'user' => { 'username' => 'bamse', 'name' => '' }, 'storyname' => 'test1', 'timestamp' => '2003-03-07 00:00:00+01', 'sectionid' => 'tester', 'commentpath' => '/bamse' } ], [ undef ], 0 ], 'Tie::IxHash' );
But, great ones, why is it inserting things like the final 'Tie::IxHash', the undef, and the 'HASH(0x85380bc)' => 0? This looks like metadata to me...
This makes a serious mess of the rest of my program (making addressing this difficult, and confuses other packages), and I do not understand what is going on.
Yours confusedly,
Kjetil
In reply to Tie::IxHash weird metadata? by Kjetil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |