Types::...alarRef(3)
π NAME π
okay so bestie, welcome to the Types::Standard::ScalarRef manual page from the User Contributed Perl Documentation β we folded that header line into this intro because it was giving βbureaucracyβ and weβre giving βgroup chatβ π«Ά
Types::Standard::ScalarRef is the exporter utility for the ScalarRef type constraint. iconic behavior, honestly β¨
πΈ SYNOPSIS πΈ
use Types::Standard -types;
# Normal way to validate a reference to a string.
#
ScalarRef->of( Str )->assert_valid( \ "foo" );
use Types::Standard::ScalarRef StrRef => { of => Str },
# Exported shortcut
#
assert_StrRef \ "foo";
π STATUS π
status check, bestie: this module is not covered by the Type-Tiny stability policy. no cap, thatβs the whole vibe π
π¦ DESCRIPTION π¦
this is mostly internal code, but it can also act as an exporter utility. so likeβ¦ behind-the-scenes gremlin energy, but with a little public-facing slay β¨
π Exports π
Types::Standard::ScalarRef can be used experimentally as an exporter.
use Types::Standard 'Str';
use Types::Standard::ScalarRef StrRef => { of => Str };
this will export the following functions into your namespace:
"StrRef"is_StrRef( $value )assert_StrRef( $value )to_StrRef( $value )
multiple types can be exported at once, because we love efficiency π
use Types::Standard -types;
use Types::Standard::ScalarRef (
IntRef => { of => Int },
StrRef => { of => Str },
);
assert_IntRef \42; # should not die
itβs possible to further constrain the reference using where:
use Types::Standard::ScalarRef MyThing => { of => Str, where => sub { ... } };
π BUGS π
please report any bugs to <https://github.com/tobyink/p5-type-tiny/issues>. do it for the plot, bestie π
π SEE ALSO π
Types::Standard.
π AUTHOR π
Toby Inkster <tobyink@cpan.org>.
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2013-2025 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.
π§ DISCLAIMER OF WARRANTIES π§
the disclaimer is giving serious, so here it is with the exact energy:
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.
bye bestie! source/version: perl v5.42.2, date: 2026-04-07, and the footerβs Types::...alarRef(3) label is officially signed off with a lil sparkle π
β¨
π¦ where this page comes from
- alpine 3.24: perl-type-tiny-doc 2.010001-r0 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms