BSD Ports

devel/p5-Class-Multimethods-Pure 0.13_1 DragonFly

Method-ordered multimethod dispatch

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
Categories
devel, perl5
Package size
19.7 KiB, 49.2 KiB installed

Description

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).

In the other systems

The newest version among them is 0.13, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
DragonFlydevel/p5-Class-Multimethods-Pure0.13_1 newestnone known-[email protected]-
FreeBSDdevel/p5-Class-Multimethods-Pure0.13_1 newestnone known-[email protected]-
HardenedBSDdevel/p5-Class-Multimethods-Pure0.13_1 newestno data-[email protected]-
GhostBSDdevel/p5-Class-Multimethods-Pure0.13_1 newestno data-[email protected]-

Install

Binary package:

pkg install p5-Class-Multimethods-Pure

From DPorts:

cd /usr/dports/devel/p5-Class-Multimethods-Pure && make install clean

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

Run dependencies 1
Required by 1