Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

•Re: Object to Map Multiple Values to a Single Key

by merlyn (Sage)
on May 27, 2003 at 21:09 UTC ( [id://261110]=note: print w/replies, xml ) Need Help??


in reply to Object to Map Multiple Values to a Single Key

Further to my ramblings here about creating a hash that has multiple values per key I have gone the whole hog and written an object to perform this function having been advised that no such object currently exists.
No such object currently exists because you are describing a hash-of-arrayrefs, which is a built-in to Perl.

I concur with the other heavy hitters that have weighed in on this thread already. Your module would never be included in code that I wrote, nor recommended by me in a publication I'm writing or class that I'm teaching. You are abstracting something that in this form does not need abstraction.

For an extreme example of the absurdity of this approach, check out the Meta hierarchy. Be sure you're sitting down while reading it, and not current swallowing any liquids.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Object to Map Multiple Values to a Single Key

Replies are listed 'Best First'.
Re^2: Object to Map Multiple Values to a Single Key
by adrianh (Chancellor) on May 27, 2003 at 21:55 UTC

    A coworker once commented to me that the only explanation she could figure out for Meta was that it was some kind of subtle piece of performance art...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-25 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found