Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Practical example of "Is Perl code maintainable"

by cLive ;-) (Parson)
on Aug 13, 2007 at 20:22 UTC ( #632303=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub set_attr {
        # 0 self
    ...
        # 1 attr
        $_[0]->{$_[1]}
    }
    
  2. or download this
    sub set_attr {
        my $self  = shift;
    ...
        my $value = shift;
        $self->{$attr} = $value;
    }
    
  3. or download this
    sub addNums {
        # 0 self
    ...
        # 2 value
        $_[0]->{$_[1]} = $_[2];
    }
    
  4. or download this
    sub capitalize {
        my ($word) = @_;
        $word = "\u$word";
        return $word;
    }
    
  5. or download this
    sub capitalize {
        $_[0]="\u$_[0]";
    }
    
  6. or download this
    $word = captitalize($word);
    
  7. or download this
    captitalize($word);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://632303]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-12-27 16:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls