Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Would you use 'goto' here?

by Fletch (Chancellor)
on Dec 06, 2001 at 07:03 UTC ( #129841=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %query_to_sub = ( officeID => \&edit_office_product,
                         fnord    => \&vreemflitzel );
    $query_to_sub{ $query->param( 'spoo' ) }->()
    
  2. or download this
    my $method = $foo->can( $query->param( 'behavior' ) );
    if( defined( $method ) ) {
    ...
    } else {
      do_error( "Unknown method " . $query->param( 'behavior' ) );
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://129841]
help
Chatterbox?
[LanX]: OH
[LanX]: you are talking about signatures?
[GotToBTru]: yes, it turns out I am
[LanX]: http://perldoc. perl.org/perlsub. html#Prototypes
[GotToBTru]: that page, strangely enough, never mentions that construct
[LanX]: ; is for optional prototypes
[LanX]: & is codeblock @ array
[GotToBTru]: okay, that is there in the text, not in literal use in any of the examples
[GotToBTru]: the text suggest it is redundant before @
[LanX]: propably ... I also notice new stuff

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2017-01-18 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (164 votes). Check out past polls.