freebsd-ports/devel/p5-Class-Multimethods-Pure/pkg-descr
Stefan Eßer fb16dfecae Remove WWW entries moved into port Makefiles
Commit b7f05445c0 has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.

This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.

Approved by:		portmgr (tcberner)
2022-09-07 23:58:51 +02:00

15 lines
465 B
Text

You can define multimethods with the "multi" declarator:
use Class::Multimethods::Pure;
multi collide => ('Bullet', 'Ship') => sub {
my ($a, $b) = @_; ...
};
multi collide => ('Ship', 'Asteroid') => sub {
my ($a, $b) = @_; ...
};
It is usually wise to put such declarations within a BEGIN block, so
they behave more like Perl treats subs (you can call them without
parentheses and you can use them before you define them).