MooseX...inglike(3pm)
π MooseX::Types::Stringlike π
okay so bestie, welcome to MooseX::Types::Stringlike β the manual page, the legend, the moment. this little icon gives you Moose type constraints for strings or string-like objects. that's it, that's the whole vibe. β¨
and for the record, this is version 0.003. yes queen, she's numbered. π
π SYNOPSIS π
like, here's how you actually use her:
package Foo;
use Moose;
use MooseX::Types::Stringlike qw/Stringlike Stringable ArrayRefOfStringlike ArrayRefOfStringable/;
has path => (
is => 'ro',
isa => Stringlike,
coerce => 1
);
has stringable_object => (
is => 'ro',
isa => Stringable,
);
has paths => (
is => 'ro',
isa => ArrayRefOfStringlike,
coerce => 1
);
has stringable_objects => (
is => 'ro',
isa => ArrayRefOfStringable,
);
copy it, paste it, slay it. π«Ά
π¦ DESCRIPTION π¦
so basically, this module is the more general, more chill, more main character version of the Str type. that's the whole point of her existence.
and here's the tea: if you turn coercions on, she will happily accept objects that overload stringification, and then coerce them into actual strings. it's giving "i can fix him" but it actually works. π
π SUBTYPES π
this module uses MooseX::Types to define the following subtypes. four of them. all iconic. π
β Stringlike
Stringlike is a subtype of Str. she can coerce Stringable objects into a string. lowkey magic, highkey useful.
β Stringable
Stringable is a subtype of Object β but only for objects that have overloaded stringification. vibe check passed or you don't get in. π
β ArrayRefOfStringlike
ArrayRefStringlike is a subtype of ArrayRef[Str]. she can coerce ArrayRefOfStringable objects into an arrayref of strings. it's a whole group chat of strings fr fr.
β ArrayRefOfStringable
ArrayRefOfStringable is a subtype of ArrayRef[Object] where the objects have overloaded stringification. a little squad of stringable objects, all matching, all cute. πΈ
π SEE ALSO π
Moose::Manual::TypesMooseX::TypesMooseX::Types::Moose
go read them, bestie, they're part of the lore. π
π ACKNOWLEDGMENTS π
thank you to Dagfinn Ilmari MannsΓ₯ker for the idea on IRC that led to this module. literally the origin story. an IRC message. history was made. ππ
π§ SUPPORT π§
π Bugs / Feature Requests
please report any bugs or feature requests through the issue tracker at <https://github.com/dagolden/MooseX-Types-Stringlike/issues>. you will be notified automatically of any progress on your issue. so you'll never be left on read. π
π¦ Source Code
this is open source software. the code repository is available for public review and contribution under the terms of the license.
<https://github.com/dagolden/MooseX-Types-Stringlike>
git clone https://github.com/dagolden/MooseX-Types-Stringlike.git
clone her, she's yours now. π
π AUTHOR π
David Golden <dagolden@cpan.org>
π CONTRIBUTOR π
Karen Etheridge <ether@cpan.org>
π COPYRIGHT AND LICENSE π
this software is Copyright (c) 2012 by David Golden.
this is free software, licensed under:
The Apache License, Version 2.0, January 2004
okay that's the whole page, no notes, no cap. π«Ά
and that's a wrap on this perl v5.34.0 manual page, dated 2022-06-16 β MooseX::Types::Stringlike, out. periodt. π
β¨πΈ
π¦ where this page comes from
- debian bookworm: libmoosex-types-stringlike-perl 0.003-3 Β· Apache-2.0
- debian trixie: libmoosex-types-stringlike-perl 0.003-3 Β· Apache-2.0
- ubuntu noble: libmoosex-types-stringlike-perl 0.003-3 Β· Apache-2.0
- ubuntu resolute: libmoosex-types-stringlike-perl 0.003-3 Β· Apache-2.0
- ubuntu stonking: libmoosex-types-stringlike-perl 0.003-3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms