MooseX...:Common(3pm)

✨ NAME ✨

MooseX::Types::Common β€” a whole library of commonly used type constraints, bestie πŸ’–

So like, this is MooseX::Types::Common(3pm), part of the User Contributed Perl Documentation, and it's genuinely just a little treasure chest of type constraints you'll use all the time. πŸŽ€


🌸 VERSION 🌸

version 0.001015

(yes she's got a version, she's a real one πŸ’…)


πŸ¦‹ SYNOPSIS πŸ¦‹

use MooseX::Types::Common::String qw/SimpleStr/;
has short_str => (is => 'rw', isa => SimpleStr);

...
#this will fail
$object->short_str("string\nwith\nbreaks");

use MooseX::Types::Common::Numeric qw/PositiveInt/;
has count => (is => 'rw', isa => PositiveInt);

...
#this will fail
$object->count(-33);

okay so notice how the second one literally says #this will fail β€” the type constraint said not today and the assignment got absolutely rejected. iconic behaviour honestly 😌✨


πŸ’œ DESCRIPTION πŸ’œ

A set of commonly-used type constraints that do not ship with Moose by default.

that's it, that's the whole vibe. Moose gives you the basics, this distro gives you the good stuff that everyone kept re-writing in their own codebases. no cap 🫢


🌈 SEE ALSO 🌈

  • MooseX::Types::Common::String
  • MooseX::Types::Common::Numeric
  • MooseX::Types
  • Moose::Util::TypeConstraints

go read those too, they're the besties of this module fr fr πŸ’–


⭐ ORIGIN ⭐

This distribution was extracted from the Reaction code base by Guillermo Roditi (groditi).

like, they didn't invent it in a vacuum β€” it came out of a real live codebase and got rescued into its own distro. main character origin story honestly πŸ‘‘


πŸ”₯ SUPPORT πŸ”₯

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types-Common> (or bug-MooseX-Types-Common@rt.cpan.org <mailto:bug-MooseX-Types-Common@rt.cpan.org>).

There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/moose.html>.

There is also an irc channel available for users of this distribution, at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>.

so if something's broken: RT. if you wanna chat about it: mailing list. if you wanna vibe in real time: #moose on irc.perl.org. pick your lane bestie πŸ’…


πŸ’– AUTHORS πŸ’–

  • Matt S Trout - mst (at) shadowcat.co.uk (<https://www.shadowcat.co.uk/>)
  • K. James Cheetham <jamie@shadowcat.co.uk>
  • Guillermo Roditi <groditi@gmail.com>

πŸŽ€ CONTRIBUTORS πŸŽ€

  • Karen Etheridge <ether@cpan.org>
  • Justin Hunter <justin.d.hunter@gmail.com>
  • Dave Rolsky <autarch@urth.org>
  • Gregory Oschwald <oschwald@gmail.com>
  • Tomas Doran <bobtfish@bobtfish.net>
  • Caleb Cushing <xenoterracide@gmail.com>
  • Denis Ibaev <dionys@gmail.com>
  • Graham Knop <haarg@haarg.org>
  • Toby Inkster <tobyink@cpan.org>

look at this roster, it's giving collaboration πŸ˜­πŸ’• every single one of them got a credit and they all earned it.


This software is copyright (c) 2009 by Matt S Trout - mst (at) shadowcat.co.uk (<https://www.shadowcat.co.uk/>).

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

so like β€” free software, same terms as Perl 5 itself, go wild, just don't be weird about it 🌸


and that's the whole page bestie!! this was MooseX::Types::Common, version 0.001015, and the doc page itself is from perl v5.40.1, dated 2025-04-24. ty for reading, mwah πŸ’‹

πŸ“¦ where this page comes from