Re: fun with hashes!
"A. Pagaltzis" <[email protected]> Sat, 24 Nov 2007 00:55:49 +0100
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <20071123235549.GG20669@klangraum> |
* Mr. Shawn H. Corey <[email protected]> [2007-11-24 00:50]: > my $sub = ( exists $dispatch{ $key } && ref( $dispatch{ $key } ) eq 'CODE' ) > ? $dispatch{ $key } > : $dispatch{ 'default' }; > > Just because you're not paranoid doesn't mean computers don't > hate you :) So why did you skip the check for whether the default value is a CODE ref? Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>