From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

MooseX::Extended::Types - Keep our type tools organized

VERSION

version 0.35

SYNOPSIS

ArrayRef
Dict
Enum
HashRef
InstanceOf
Str
compile
);

As a convenience, if you're using MooseX::Extended, you can do this:

use MooseX::Extended types => [qw(
ArrayRef
Dict
Enum
HashRef
InstanceOf
Str
compile
)];

If you're brave:

use MooseX::Extended types => ':all';

But that exports everything and it's easy to have surprising conflicts.

DESCRIPTION

A basic set of useful types for MooseX::Extended, as provided by Type::Tiny. Using these is preferred to using using strings due to runtime versus compile-time failures. For example:

# fails at runtime, if ->name is set
param name => ( isa => 'str' );
# fails at compile-time
param name => ( isa => str );

TYPE LIBRARIES

We automatically include the types from the following:

EXTRAS

The following extra functions are exported on demand or if using the :all export tag (but you probably don't want to use that tag).

Type::Params

  • compile

  • compile_named

  • multisig

  • validate

  • validate_named

  • compile_named_oo

  • Invocant

  • wrap_subs

  • wrap_methods

  • ArgsObject

Types::Standard

  • slurpy

AUTHOR

Curtis "Ovid" Poe <curtis.poe@gmail.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2022 by Curtis "Ovid" Poe.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)