MouseX:...::Common(3)

πŸ“¦
version 0.001000 Β· 3 versions
, in epel 10

πŸ¦‹ MouseX::Types::Common β€” the manual page (3), user contributed Perl documentation, bestie

okay so picture this: you're deep in Perl land, the Mouse docs are right there, and you're like "where are all the useful types at??" β€” boom. this page. it's MouseX::Types::Common, and it's the friend who shows up with snacks πŸ’…


✨ NAME ✨

MouseX::Types::Common β€” literally just a whole set of commonly-used type constraints, packaged up and ready to go πŸŽ€


🌸 SYNOPSIS 🌸

okay so here's the vibe, watch closely:

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

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

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

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

like, SimpleStr said no newlines bestie, and PositiveInt looked at -33 and said absolutely not 😭 both of those calls fail. that's the whole point. that's the assignment. slay πŸ”₯


πŸ’– DESCRIPTION πŸ’–

it's a set of commonly-used type constraints that do not ship with Mouse by default β€” so like, Mouse didn't bring them to the party, but this module did 🫢

also important: this module is based on "MooseX::Types::Common". giving credit where credit is due, periodt ✨


🧚 SEE ALSO 🧚

the friend group, in order πŸ’œ

  • MouseX::Types::Common::String
  • MouseX::Types::Common::Numeric
  • MouseX::Types
  • Mouse::Util::TypeConstraints
  • MooseX::Types::Common

iykyk πŸ‘‘


πŸŽ€ ORIGINAL AUTHORS πŸŽ€

so this whole distribution got extracted from the Reaction code base by Guillermo Roditi (groditi) β€” icon behaviour, honestly 🌈

and the original authors of this library are:

  • Matt S. Trout
  • K. J. Cheetham
  • Guillermo Roditi

legends, all of them πŸ‘‘πŸ‘‘πŸ‘‘


⭐ AUTHOR ⭐

Goro Fuji (gfx) <gfuji@cpan.org> β€” main character energy fr fr πŸ’«


πŸ’… LICENSE πŸ’…

this library is free software, and you can redistribute it and/or modify it under the same terms as Perl itself. no cap, go off πŸ“


okay that's the whole page, you're welcome, go write some type constraints and text me when it works πŸ˜­πŸ’–

sign-off time: this was perl v5.40.0, dated 2024-07-19, and the page is MouseX:...::Common(3) β€” mwah, catch you on the next man page bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from