MooseX...:Moose(3pm)

πŸ’… MooseX::Types::Moose(3pm) β€” the vibe check

okay bestie, so this is a page from the User Contributed Perl Documentation section of the manual, and it's literally the glow-up guide for MooseX::Types::Moose. Pull up a chair πŸŽ€


🌸 NAME 🌸

MooseX::Types::Moose β€” type exports that match the types shipped with Moose. no cap, that's the whole thing ✨


πŸ¦‹ VERSION πŸ¦‹

version 0.51 β€” yes she's numbered, yes she's iconic πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

okay so here's how you actually use her, look:

package Foo;
use Moose;
use MooseX::Types::Moose qw( ArrayRef Int Str );
use Carp qw( croak );

has 'name',
  is  => 'rw',
  isa => Str;

has 'ids',
  is  => 'rw',
  isa => ArrayRef[Int];

sub add {
    my ($self, $x, $y) = @_;
    croak 'First arg not an Int'  unless is_Int($x);
    croak 'Second arg not an Int' unless is_Int($y);
    return $x + $y;
}

1;

like… she's giving "I type-check my friends before I let them into the function" πŸ’… and honestly? valid.


✨ DESCRIPTION ✨

So this package is basically a virtual library for MooseX::Types β€” and what she does is she's able to export, like, all the types known to Moose. every single one. obsessed. 🫢

If you wanna know the general usage info (the how-to, the etiquette, the lore), go peek at MooseX::Types. that's where the general stuff lives, iykyk.


πŸ”₯ METHODS πŸ”₯

πŸ’– type_storage

She overrides MooseX::Types::Base's "type_storage" so that it hands you back a hash reference containing all the built-in Moose types. that's it. that's the method. and she ate. 🌈


πŸ‘€ SEE ALSO πŸ‘€

  • Moose
  • Moose::Util::TypeConstraints

like, go read your friends too, they're relevant πŸ¦‹


πŸ’€ SUPPORT πŸ’€

Bugs may be submitted through the RT bug tracker https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types (or bug-MooseX-Types@rt.cpan.org β€” yes that's an email, mailto link and all: bug-MooseX-Types@rt.cpan.org).

There's also a mailing list for users of this distribution, chilling at http://lists.perl.org/list/moose.html 🌸

And there's an irc channel for users of this distribution too, at "#moose" on "irc.perl.org" β€” irc://irc.perl.org/#moose. come say hi, the vibes are immaculate 🧚


πŸ‘‘ AUTHOR πŸ‘‘

Robert "phaylon" Sedlacek <rs@474.at> β€” king behaviour, honestly πŸ™ˆ


This software is copyright (c) 2007 by Robert "phaylon" Sedlacek.

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

like, free as in freedom, bestie β€” go wild (but like, within the licence terms, fr fr).


mwah πŸ’‹ that's the whole page! brought to you by perl v5.42.0, dated 2025-07-25, and it's MooseX::Types::Moose(3pm) all the way down. stay type-safe, stay slay βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from