Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Unconstructive Criticism

by adrianh (Chancellor)
on May 27, 2003 at 15:09 UTC ( #261011=note: print w/replies, xml ) Need Help??

in reply to A Quote
in thread Object to Map Multiple Values to a Single Key

The object was never meant to be a replacement for hashes

That was (as I read it) Abigail's point. You're not providing a front end to a hash, you're providing an easy way of doing key -> arrayref mappings. You're dealing with a hashref not a hash. Hence your module description could be better expressed.

I think you read way to much into Abigail's post. Abigail's (usually pretty darn accurate) comments may be blunt, but the bluntness is always aimed at code, not people.

Unlike your message, which I --'d since I find it too close to a personal attack for my tastes.

The object is trivial. Nothing wrong with that in itself. However we have an expressive syntax in Perl already for this sort of thing.

my %map; push @{$map{K1}}, 'V1'; push @{$map{K1}}, 'V2'; push @{$map{K2}}, 'V3'; push @{$map{K3}}, 'V4'; print Dumper(\%map); # or my %map2; $map2{K1} = ['V1', 'V2']; $map2{K2} = ['V3']; $map2{K3} = ['V4']; print Dumper(\%map2); # or my %map3; @map3{'K1','K2','K3'} = (['V1', 'V2'], ['V3'], ['V4']); print Dumper(\%map3); # etc.

So, for me, it doesn't really supply anything that Perl doesn't give us already for free.

On a stylistic note I would use add_value() (or similar) rather than put() since the latter sounds like it should be the inverse of get() and it isn't.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://261011]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-04-20 07:57 GMT
Find Nodes?
    Voting Booth?