MooseX...:LaxNum(3pm)
π NAME π
MooseX::Types::LaxNum β a LaxNum type that gives you back the loose behavior of Moose's Num from before 2.10. bestie, it's giving "the old ways were comfier" and honestly? valid.
β¨ VERSION β¨
version 0.04 π
πΈ SYNOPSIS πΈ
okay so here's the whole vibe:
#!/usr/bin/env perl
use strict;
use warnings;
package Foo {
use Moose;
use MooseX::Types::LaxNum;
has 'laxnum', is => 'rw', isa => 'LaxNum';
}
my $foo = Foo->new( laxnum => '1234' );
like. that's it. that's the whole thing. '1234' walks in as a string and gets accepted with zero drama π«Ά
π DESCRIPTION π
so LaxNum accepts everything for which looks_like_number in Scalar::Util returns true. no cap, if Scalar::Util says it looks number-y, LaxNum is like "say less, you're in" β¨
and the whole reason this module exists? you can use it to get the old behavior of Moose::Util::TypeConstraints::Num, because Num has been changed to be more strict. so if you're out here missing the chill version from pre-2.10, this is your girl π
π NAME π (yes, again β the manpage said it twice, i don't make the rules i just slay)
MooseX::Types::LaxNum
π COPYRIGHT & LICENSE π
Copyright 2013 Upasana Shukla. π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π¦
π¦ AUTHOR π¦
Upasana Shukla <me@upasana.me> π β absolute icon, thank you for your service π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2013 by Upasana Shukla. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. β¨
and that's the whole page, bestie β documented by the User Contributed Perl Documentation squad, generated by perl v5.34.0, dated 2022-06-15. go forth and type your lax nums ππΈ
π¦ where this page comes from
- debian bookworm: libmoosex-types-laxnum-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoosex-types-laxnum-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoosex-types-laxnum-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-types-laxnum-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-types-laxnum-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms