Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

RFC: New style for argument check in subs

by LanX (Canon)
on Sep 05, 2012 at 10:16 UTC ( #991802=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub padded {
      my ($text, $arg_ref) = @_;  
    ...
      
      return $filler x $left . $text . $filler x $right; 
    } 
    
  2. or download this
    sub unpack_named_first {
      my ($pos1,  $pos2 ,%arg) = @_;        # unpack 
    ...
     
      # ...etc
    }
    
  3. or download this
    sub unpack_named_later {
      my ($pos1 ,$pos2 ,%arg) = @_;        
    ...
      
      # ...etc
    }
    
  4. or download this
    sub unpack_named_on_the_fly {
      my ($pos1 ,$pos2 ,%arg) = @_;        
    ...
     
      # ...etc
    }
    
  5. or download this
      $pos1     //  die_miss();
      $pos2     //  warn_miss();   
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://991802]
Approved by marto
Front-paged by davies
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2015-07-04 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls