MooseX...:LaxNum(3pm)

πŸ“¦
version 0.04 Β· 2 versions
  • 0.04 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.04 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸŽ€ 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 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 🫢


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