Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

RFC: New style for argument check in subs

by LanX (Chancellor)
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://991802]
Approved by marto
Front-paged by davies
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2016-12-04 02:58 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (61 votes). Check out past polls.