Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Refactoring Perl #2 - Inline Method

by agianni (Hermit)
on Jun 26, 2007 at 19:10 UTC ( #623470=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub get_rating{
        my $self = shift;
    ...
        my $self = shift;
        return $self->{_number_of_late_deliveries} > 5;
    }
    
  2. or download this
    sub get_rating{
        my $self = shift;
        return ( $self->{_number_of_late_deliveries} > 5 ) ? 2 : 1;
    }
    
  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://623470]
Approved by Old_Gray_Bear
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (19)
As of 2015-07-02 18:23 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 (44 votes), past polls