Fix an issue on the Int type constraint, to accept 2*46 as Int and to refuse 2**46...
[gitmo/Mouse.git] / lib / Mouse / PurePerl.pm
index 2790112..439217f 100644 (file)
@@ -148,12 +148,7 @@ sub Value      {  defined($_[0]) && !ref($_[0]) }
 sub Num        {  looks_like_number($_[0]) }
 sub Int        {
     my($value) = @_;
-    looks_like_number($value) && do{
-        # work around RT #55048
-        # This is for more than 32 bit int on 32 bit systems
-        require POSIX;
-        POSIX::fmod($value, 1) == 0;
-    };
+    looks_like_number($value) && $value =~ /\A [+-]? [0-9]+  \z/xms;
 }
 sub Str        {
     my($value) = @_;
@@ -719,7 +714,7 @@ Mouse::PurePerl - A Mouse guts in pure Perl
 
 =head1 VERSION
 
-This document describes Mouse version 0.50_07
+This document describes Mouse version 0.50_08
 
 =head1 SEE ALSO