http://qs321.pair.com?node_id=436119


in reply to looking for inspiration on 'compare'

BUT
when i try to read out key/value pairs, i got "undef" on values for which comparison function returned -1.
That sounds fishy, are you sure you're not storing undef? A custom compare subroutine should not effect the values stored (and its most likely that its not).
Any clue on how to make a Compare function different from the one on manual?
You already have one, so just like that.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re^2: looking for inspiration on 'compare'
by zioigor (Initiate) on Mar 03, 2005 at 08:36 UTC
    Hi, yes i am logging every step before and after the ->put() infact I do agree with what you say. But every check i made goes in the direction u suggest. I do print with Dumper the tied hash, and those read return undef only for -1 comapre values. On binary file i checked and data are there. I mentioned the minus one just because is the only clue i have ... on non working values ...
      ...On binary file i checked and data are there. I mentioned the minus one just because is the only clue i have ... on non working values ...
      So which do you think is more likely, that there is something seriously broken with a very old and thoroughly tested module, or that you're doing something boneheaded? You need to submit a self contained example which demonstrates your bug.

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.

        I do still agree, ill try to post an example but it will take me sometime. And yes i do think iam doing something wrong, but if i knew what, i wouldnt be posting here for suggestion. thanks again