MooseX:...d::Types(3)
πΈ NAME πΈ
MooseX::Extended::Types β bestie, it's literally just keeping our type tools organized. That's the whole job. And honestly? It eats. π
π VERSION π
version 0.35. Yes queen, we're on 0.35. β¨
β¨ SYNOPSIS β¨
Okay so, the classic entrance:
use MooseX::Extended;
use MooseX::Extended::Types;
use MooseX::Extended::Types qw(
ArrayRef
Dict
Enum
HashRef
InstanceOf
Str
compile
);
Now as a little treat β a convenience, if you will β if you're already using MooseX::Extended, you can just do this instead:
use MooseX::Extended types => [qw(
ArrayRef
Dict
Enum
HashRef
InstanceOf
Str
compile
)];
And if you're brave (or unhinged, no judgment π«Ά):
use MooseX::Extended types => ':all';
But just so you know β that exports everything, and it's super easy to end up with surprising conflicts. So maybe don't. π
π DESCRIPTION π
A basic set of useful types for "MooseX::Extended", as provided by Type::Tiny. Using these is preferred to using strings, and the reason is runtime versus compile-time failures. Like, would you rather find out at 3am in prod or while you're still typing? Exactly. For example:
# fails at runtime, if ->name is set
param name => ( isa => 'str' );
# fails at compile-time
param name => ( isa => str );
See how the second one is giving caught immediately energy? That's the one. π
π¦ TYPE LIBRARIES π¦
We automatically include the types from the following:
Types::Standardπ
You can import them individually, or grab them all with the ":Standard" tag:
use MooseX::Extended::Types types => 'Str';
use MooseX::Extended::Types types => [ 'Str', 'ArrayRef' ];
use MooseX::Extended::Types types => ':Standard';
Using the ":Standard" tag is equivalent to:
use Types::Standard;
No import list is supplied directly to the module, so non-default type functions must be asked for by name.
Types::Common::Numericπ’
You can import them individually, or grab them all with the ":Numeric" tag:
use MooseX::Extended::Types types => 'Int';
use MooseX::Extended::Types types => [ 'Int', 'NegativeOrZeroNum' ];
use MooseX::Extended::Types types => ':Numeric';
Using the ":Numeric" tag is equivalent to:
use Types::Common::Numeric;
No import list is supplied directly to the module, so non-default type functions must be asked for by name.
Types::Common::Stringπ
You can import them individually, or grab them all with the ":String" tag:
use MooseX::Extended::Types types => 'NonEmptyStr';
use MooseX::Extended::Types types => [ 'NonEmptyStr', 'UpperCaseStr' ];
use MooseX::Extended::Types types => ':String';
Using the ":String" tag is equivalent to:
use Types::Common::String;
No import list is supplied directly to the module, so non-default type functions must be asked for by name.
π₯ EXTRAS π₯
The following extra functions are exported on demand, or if you're using the ":all" export tag β but honestly bestie, 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)
And that's the whole page, babes β written for perl v5.42.0, dated 2025-07-25. Go forth and type-check your little heart out. πβ¨
π¦ where this page comes from
- fedora 43: perl-MooseX-Extended 0.35-6.fc43 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms