MooseX::Types::LaxNum - A LaxNum type which provides the loose behavior Moose's Num pre-2.10
version 0.02
#!/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' );
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.
LaxNum
Moose::Util::TypeConstraints::Num
MooseX::Types::LaxNum
Upasana Shuka, me@upasana.me
me@upasana.me
Copyright 2013 Upasana Shukla.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Upasana Shukla <me@upasana.me>
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.
To install MooseX::Types::LaxNum, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Types::LaxNum
CPAN shell
perl -MCPAN -e shell install MooseX::Types::LaxNum
For more information on module installation, please visit the detailed CPAN module installation guide.