Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

The beauty of MMD

by Ovid (Cardinal)
on Jul 28, 2005 at 17:06 UTC ( [id://479051]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %dispatch = (
      Foo => \&_foo,
      Bar => \&_bar,
    ...
      my $method = $dispatch{$type} || die "Can't find method ...";
      $self->$method($data);
    }
    
  2. or download this
    multimethod process (Foo $thing, String $data) { ... }
    
    multimethod process (Bar $thing, String $data) { ... }
    
    multimethod process (Baz $thing, String $data) { ... }
    
  3. or download this
    sub name {
      my ($self, $name) = @_;
      $self->{name} = $name if $name;
      return $self->{name};
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://479051]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-03-29 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found