The idea of solving a problem with your database code in your data class feels wrong to me. The fact that your database code is "in many places" is your real problem.
A good solution would be to numify the value before placing it in the object in the first place.
There are some more hackish solutions too:
In reply to Re: Moose - ensuring a getter returns a number
by ikegami
in thread Moose - ensuring a getter returns a number
by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |