[mplspm]: Howto do switch with fall-through
Josh Jore
josh at greentechnologist.org
Fri Aug 30 20:42:43 CDT 2002
On Fri, 30 Aug 2002, Dan Oelke wrote:
> ... Especially since I'm going to have from 10-20 "phases" and this
> scales up much easier.
>
> >... Since you have well defined phase names you could do something like
> > this:
> >my %phase = ('Default',0,'Deliver',1,'Baseline',2,'Rebase',3,'Build',4);
> >my @funcs = (\&default,\&deliver,\&baseline,\&rebase,\&build);
> > ...
So... I don't know the backstory here but that looks really odd having
hash values be index values to a parallel array. Is there any reason that
the sub refs aren't just stored directly into the array?
Joshua b. Jore -{ weird geeky madness }-> http://www.greentechnologist.org
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo at pm.org
with "unsubscribe mpls" in the body of the message.
More information about the Mpls-pm
mailing list