Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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: (12)
As of 2016-09-30 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (572 votes). Check out past polls.