Front page | perl.fwp |
Postings from November 2007
Re: fun with hashes!
Thread Previous
|
Thread Next
From:
Bernie Cosell
Date:
November 24, 2007 05:36
Subject:
Re: fun with hashes!
Message ID:
4747E28D.24209.33CBB1@bernie.fantasyfarm.com
On 23 Nov 2007 at 23:54, Uri Guttman wrote:
> >>>>> "SHC" == Shawn H Corey <shawnhcorey@magma.ca> writes:
>
> SHC> Vladi Belperchinov-Shabanski wrote:
> >> On Fri, 23 Nov 2007 23:18:20 +0100
> >> "A. Pagaltzis" <pagaltzis@gmx.de> wrote:
> >>
> >>> * Jerrad Pierce <belg4mit@MIT.EDU> [2007-11-23 22:50]:
> >>>> exists( $dispatch{$sub} ) ? $dispatch{$sub}->() :
> >>>> warn "Key <$sub> does not exist in the dispatch table";
> >>> ( $dispatch{$sub} || sub { warn "no such action '$sub'" } )->();
> >>>
> >> or &{ ... || ... }->()
> >> just to avoid problems like:
> >> print ( $dispatch{$sub} || sub { warn } )->();
>
> SHC> And you wonder why I dislike dispatch tables? So simple in
> SHC> concept, so ugly in reality.
>
> s/dispatch tables/inheritance/g ;
>
> :)
s/inheritance/destructors/g ;
:o)
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
mailto:bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
Thread Previous
|
Thread Next