Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 130440
Status: open
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: Mr.Muskrat [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Int Type Constraint unforgiving of Math::Int64/UInt64 objects
Set severity to Wishlist since this isn't really a bug but a nice to have... It would be awesome if the Int type constraint was aware of Math::Int64 and Math::UInt64 objects. Moose::Util::throw_exception('ValidationFailedForInlineTypeConstraint', 'type_constraint_message', 'Validation failed for \'Int\' with value Math::Int64=\28200', 'class_name', '<REDACTED>', 'attribute_name', 'company_id', 'value', 'Math::Int64=SCALAR(0x5564325d2f50)') called at reader <REDACTED>::company_id (defined at <REDACTED> line XXX) line XXX
Moose doesn't handle objects which overload math operations, and for backcompat reasons that won't change. There are a few options you can look at: * Create your own numeric type which handles this and use that internally. * Use Specio (https://metacpan.org/release/Specio) and its number types, which handle overloaded objects in a fairly DWIMmy way.