Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Often Overlooked OO Programming Guidelines

by Ovid (Cardinal)
on Dec 29, 2003 at 21:05 UTC ( #317551=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      package Foo;
                                                                          
    +                                                                     
    +                 
      sub new {
    ...
          my ($self, @args) = @_;
          return map { ++$_ } @args;
      }
    
  2. or download this
      # in package Foo
      sub wonk {
          my $self = shift;
          _fiddle($self, @_);
      }
    
  3. or download this
                                                                          
    +                                                             
      package Bar;
      use Foo;
    ...
          my $self = shift;
          $self->{_foo}->wonk(@_); # delegation!
      }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://317551]
help
Chatterbox?
[erix]: when the google-per-line coefficient > 1 you have located a good place to learn a lot ;)
[erix]: also known, I think, as a gravy train :P
erix google "gravy train" :)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2018-05-22 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?