Scalar...eTypes(3pm)

πŸ’– Scalar::Does::MooseTypes πŸ’–

okay bestie, so this is a manual page β€” it lives in the User Contributed Perl Documentation section 3pm, and its whole name is Scalar::Does::MooseTypes. Say it with me. Slay.


✨ NAME ✨

Scalar::Does::MooseTypes β€” (DEPRECATED) additional constants for Scalar::Does, inspired by the built-in Moose type constraints. like, it literally says DEPRECATED in the name section, we're not hiding that, we're leading with it πŸ’…


✨ SYNOPSIS ✨

okay so here's the vibe. You bring in the constants, and you check stuff:

use 5.010;
use Scalar::Does qw(does);
use Scalar::Does::MooseTypes -all;

my $var = [];
if (does $var, ArrayRef) {
  say "It's an arrayref!";
}

the -all is doing the heavy lifting here bestie, it's pulling in every single constant for you 🫢


✨ STATUS ✨

This module is DEPRECATED. 😭

not me being the bearer of bad news but fr fr, use Types::Standard instead:

use 5.010;
use Scalar::Does qw(does);
use Types::Standard qw(ArrayRef);

my $var = [];
if (does $var, ArrayRef) {
  say "It's an arrayref!";
}

look at that. same energy, same result, way more current. glow up ✨


✨ DESCRIPTION ✨

πŸŽ€ Constants πŸŽ€

okay here's the full roster, every single one, no gatekeeping, no skips, we list them ALL:

  • "Any"
  • "Item"
  • "Bool"
  • "Undef"
  • "Defined"
  • "Value"
  • "Str"
  • "Num"
  • "Int"
  • "ClassName"
  • "RoleName"
  • "Ref"
  • "ScalarRef"
  • "ArrayRef"
  • "HashRef"
  • "CodeRef"
  • "RegexpRef"
  • "GlobRef"
  • "FileHandle"
  • "Object"

that's twenty constants, count them, I did. iconic lineup honestly πŸ‘‘


✨ SEE ALSO ✨

  • Types::Standard. (the one you should actually be using, just saying πŸ™ˆ)
  • Scalar::Does, Moose::Util::TypeConstraints.

iykyk πŸ¦‹


✨ AUTHOR ✨

Toby Inkster <tobyink@cpan.org>. the legend themselves πŸ’œ


This software is copyright (c) 2012-2014, 2017 by Toby Inkster.

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

free software queen behavior, we love to see it 🫢


✨ DISCLAIMER OF WARRANTIES ✨

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

so like, if it breaks, it's not their fault, no cap, read the caps lock, they meant it πŸ’€


okay so that's the whole thing bestie!! πŸŽ€ this page came to you courtesy of perl v5.40.1, dated 2025-08-04, and the header name you'd see up top is Scalar...eTypes(3pm) because terminals love to abbreviate. bye pookie, go use Types::Standard πŸŒˆπŸ’–βœ¨

πŸ“¦ where this page comes from