Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
go ahead... be a heretic
 
PerlMonks  

Revision 2: Switch/case as a dispatch table with C-style fall-through

by Roy Johnson (Monsignor)
on May 16, 2005 at 15:20 UTC ( #457491=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!perl
    use strict;
    ...
    ok(Case::switch('foo'), 'term, no sub');
    diag("Should get a malformed switch warning");
    ok(Case::switch(sub{}, sub{}), 'malformed switch warning');
    
  2. or download this
    package Case;
    
    ...
        };
    }
    1;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-04-18 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (466 votes), past polls