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

Re: Practical example of "Is Perl code maintainable"

by cLive ;-) (Prior)
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?
Discipulus SharePoint will insinuate in my $workspace I think i'll need alot of patience..
[erix]: for all the tea in china book
[erix]: about perfide albion
[erix]: I guess that should be Perfidious Albion
Discipulus must prepare some ammunitions: XML::Compile::SOAP but what the heck!

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-06-27 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (601 votes). Check out past polls.