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

A novice's thoughts on applying Demeter to extension code

by diotalevi (Canon)
on Nov 22, 2004 at 19:52 UTC ( [id://409709]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #in a time sensitive loop
    $logger->isFlushPending(1);
    
    ...
      $logger->flush();
      $logger->isFlushPending(0);
    }
    
  2. or download this
    #in a time sensitive loop
    $logger->setFlushPending();
    
    #later on
    $logger->flushPending();
    
  3. or download this
    sub main::ManagersCostCenter::{
        my $Employee = shift;
        return $Employee->Manager->CostCenter;
    }
    
  4. or download this
    package MyEmployee;
    @ISA = 'Employee';
    
    sub ManagersCostCenter {
        $self->Manager->CostCenter;
    }
    
  5. or download this
    package MyEmployee;
    
    sub ManagersCostCenter {
    ...
    sub new { ... }
    sub can { ... }
    sub AUTOLOAD { ... }
    
  6. or download this
    sub Employee::ManagersCostCenter {
        $Employee->Manager->CostCenter;
    }
    
  7. or download this
    $Employee->My::Employee::ManagersCostCenter;
    
    sub My::Employee::ManagersCostCenter {
        $Employee->Manager->CostCenter;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-20 16:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found