Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: how to avoid mis-spelling hash keys?

by Beatnik (Parson)
on Jan 05, 2003 at 18:06 UTC ( #224437=note: print w/ replies, xml ) Need Help??


in reply to how to avoid mis-spelling hash keys?

You can just abuse String::Approx for approximate string matchings :)

Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.


Comment on Re: how to avoid mis-spelling hash keys?
Re: Re: how to avoid mis-spelling hash keys?
by janx (Monk) on Jan 05, 2003 at 18:21 UTC
Re: Re: how to avoid mis-spelling hash keys?
by graff (Chancellor) on Jan 05, 2003 at 18:21 UTC
    I think doing approximate string matches for hash keys in objects would be the programmer's equivalent to playing Russian Roulette. Bad idea.
      Well, if there is an exact match, it's no roulette. There are quite simple techniques to verify a hash key actually exists. In fact, like janx noted above, there's Tie::Hash::Approx by our very own OeufMayo which does pretty much just that :)

      Tie::Hash::Approx - Approximative match of hash keys using String::Approx

      Greetz
      Beatnik
      ... Quidquid perl dictum sit, altum viditur.
Re: Re: how to avoid mis-spelling hash keys?
by htoug (Deacon) on Jan 06, 2003 at 12:39 UTC

      Evil? Me? Surely you're thinking of someone else :)

      Is this the talk you mean?

      --
      <http://www.dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

        /me attended both talks you did in Amsterdam in 2.00.1 and didn't notice anything evail about it :)

        Greetz
        Beatnik
        ... Quidquid perl dictum sit, altum viditur.
        Precisely! I enjoyed it immensely.
        Especially after I found out about Tie::Hash::Cannabinol - a CPAN module I would enjoy finding a serious use for. I've been close to using it in production, but lacked the courage. I'm still working on it though :)
          Evil?
          by htoug (Deacon) on Jan 07, 2003 at 12:58 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://224437]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2014-12-29 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (185 votes), past polls