in reply to Re: tying a hash from a big dictionary
in thread tying a hash from a big dictionary

I've wrapped its functionality into an OO-module for convenience:

"I've wrapped your bicycle in tissue paper and a nice bow." -- but it sure ain't for "convenience" :)


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^2: tying a hash from a big dictionary

Replies are listed 'Best First'.
Re^3: tying a hash from a big dictionary
by repellent (Priest) on Nov 02, 2011 at 01:24 UTC
    I find it convenient to have a single transform sub that produces the key-value pair for the object to search+parse a hash-like dict file. Handling/closing of filehandle is really just cake icing.

    Search::Dict sets the filehandle position to the first line greater than or equal $key. This seems pretty raw to me (read: that I should probably write some wrapper that takes care of the edge cases). The OO stick is not always the first thing I reach for, in case you're wondering.