Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
laziness, impatience, and hubris
 
PerlMonks  

RFC: New style for argument check in subs

by LanX (Abbot)
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 exploiting the Monastery: (3)
As of 2014-04-21 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (490 votes), past polls