MooseX::Function::Parameters
use MooseX::Function::Parameters; fun add (Int $a, Int $b) { $a + $b } package My::Class; use Moose; use MooseX::Function::Parameters; method compare (My::Class $with) { $self->value <=> $with->value }
A lightweight wrapper around Function::Parameters which provides fun and method subroutine keywords which integrate with the Moose type system.
Designed to be compatible with Function::Parameters version 1, where newer versions of Function::Parameters aren't
To install MooseX::Function::Parameters, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Function::Parameters
CPAN shell
perl -MCPAN -e shell install MooseX::Function::Parameters
For more information on module installation, please visit the detailed CPAN module installation guide.