NAME

Type::Tiny::Signatures - Method/Function Signatures using Type::Tiny Constraints

VERSION

version 0.01

SYNOPSIS

use Type::Tiny;
use Type::Tiny::Signatures;

method hello (Str $greeting, Str $fullname) {
    print "$greeting, $fullname\n";
}

DESCRIPTION

This module uses Function::Parameters to extends Perl with keywords that let you define methods and functions with parameter lists which can be validated using Type::Tiny type constraints. The type constraints can be provided by the Type::Tiny standard library, Types::Standard, or any supported user-defined type library which can be a Moose, MooseX::Type, MouseX::Type, or Type::Library library.

use Type::Tiny;
use Type::Tiny::Signatures qw(MyApp::Types);

The method and function signatures can be configured to incorporate the user-defined type constraints in routine parameter list validation by passing the library package name as an argument to the Type::Tiny::Signatures usage declaration.

AUTHOR

Al Newkirk anewkirk@ana.io

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Al Newkirk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.