Tie::DxHash - anyone used this before? - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming > Perl » Tie::DxHash - anyone used this before?


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 07-02-2006   #1 (permalink)
samuel
Member
 
Join Date: Jun 2006
Age: 33
Posts: 34
Default Tie::DxHash - anyone used this before?

I'm using perl 5.8.8 on a linux (debian 3) system, with the "Tie:xHash" package (v0.93) installed.

The Tie:xHash package available from CPAN claims to implement an order-preserving, duplicate-key allowing, hash binding for perl. This is similar to the Tie::IxHash which does the same, but without duplicate-keys allowed.

I have run across a bug in the Tie:xHash, and submitted the bug to the CPAN bug tracking, but haven't received any word back.

i was wondering if anyone has ever used this, successfully? My problem is that whenever I call a function on the Tie:xHash enabled hash that updates the iterator pointer (like "keys" or "each"), the hash get into some sort of invalid state, and i cannot reset it.

what it appears to be is that after any kind of iteration, either by those function calls, or by "Dumper" or whatever, some sort of "end-of-hash" pointer is no longer updated or initialized correctly.

I can continue to assign values to the hash, and those values DO get stored in the hash, but when i iterate over the hash again, or feed it to Dumper, it doesn't show the new items. But, i can individually access one of the new items, and it's value is there.

However, I *do* get a warning: "Use of uninitialized value in string eq at /usr/local/lib/perl5/site_perl/5.8.8/Tie/DxHash.pm line 69." when I do that. So, it's my guess that something about the iteration functions of this package sets the hash into an invalid state so that further hash append/add operations do not correctly update all internal data and pointers appropriately.

anyone confirm this or have fixed/worked around this before?

Samuel
samuel is offline   Reply With Quote


Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


footer left
All times are GMT. The time now is 08:07 PM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Mobile Phones | Repair Bad Credit | Car Finance | Auto Loans | Fast Loans

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49