Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Using Number Ranges in a Dispatch Table

by tobyink (Abbot)
on Feb 19, 2012 at 22:50 UTC ( #954934=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    {
       package Smart::Dispatch::ConditionList;
    ...
          ref $_[0] eq 'CODE' ? 'dispatch' : 'value';
       }
    }
    
  2. or download this
    use 5.010;
    use strict;
    ...
    # call dispatch table on '1000' but only if the dispatch table
    # has an entry that covers value '4'.
    say $dispatch.1000 if $dispatch ~~ 4;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://954934]
help
Chatterbox?
[zentara]: do you feel good about a non-open-source code, being in control of your display functions?
[choroba]: If you're not going to play 3d games on it, using the open source driver should be enough
[zentara]: choroba that is true, and the wise choice, but I want to see how fast I can get fglrx3dspheres to run... just as an intellectual challenge :-)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-05-26 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?