Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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

Log In?

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
[ambrus]: `quote
[ambrus]: sorry, typed in the wrong box
[LanX]: Your mother: je ne t'aime plus! ;)
[choroba]: seems lispy
[Your Mother]: Be nice! I speak that much French. Though I also like that song.
[choroba]: So, I joined Pod Černư Vrch some months ago to still have the fun. But I wouldn't call it "punk" anymore...
[LanX]: choroba deaf after one rehearsal per year ?
Discipulus .. per ear!
[LanX]: LOL
[choroba]: we used to play more :)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-03-24 12:33 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (301 votes). Check out past polls.