NAME
Moove - functions and methods with parameter lists and type constraints
VERSION
version 0.001
SYNOPSIS
use Moove;
func foo (Int $number, Str $text)
{
...
}
use Moove classes => [qw[ Some::Class ]];
method bar (Some::Class $obj)
{
...
}
use Moove -trycatch;
func foobar () {
try {
die "meh";
} catch {
return "caught meh.";
}
}
DESCRIPTION
This module inherits Function::Parameters with some defaults and type constraints with Type::Tiny.
Some reasons to use Moove:
No Moose dependency
No Devel::Declare dependency
A nearly replacement for Method::Signatures
But with some differences...
This is also a very early release.
IMPORT OPTIONS
The import method supports these keywords:
types
As an ArrayRef, calls
Types::Registry->for_class($caller)->add_types(@$types)
.As a ScalarRef, calls
Types::Registry->for_class($caller)->add_types($$types)
.classes
For each class in this ArrayRef, calls
Types::Registry->for_class($caller)->add_types(Type::Utils::class_type($class))
.-nostdtypes
Do not import Types::Standard.
-trycatch
Import Syntax::Feature::Try with type constraints.
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/zurborg/libmoove-perl/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHOR
David Zurborg <zurborg@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2016 by David Zurborg.
This is free software, licensed under:
The ISC License