logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MooseX::Types::LaxNum - A LaxNum type which provides the loose behavior of Moose's Num pre-2.10

Author

       Upasana Shukla <me@upasana.me>

Description

       "LaxNum" accepts everything for which "looks_like_number" in Scalar::Util return true.  It can be used to
       get the old behaviour of "Moose::Util::TypeConstraints::Num", since Num has been changed to be more
       strict.

Name

       MooseX::Types::LaxNum

Synopsis

          #!/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' );

Version

       version 0.04

See Also