Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Refactoring Perl #1 - Extract Method

by agianni (Hermit)
on Jun 22, 2007 at 04:15 UTC ( #622705=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub print_owing{
        my $self = shift;
    ...
        print 'name: ', $self->{_name}, "\n";
        print "amount: $outstanding\n";
    }
    
  2. or download this
    sub print_owing{
        my $self = shift;
    ...
        }
        return $result;
    }
    
  3. or download this
    perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi
    +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79
    +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2015-07-30 04:57 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 (270 votes), past polls