Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-19 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found