While you could try using a module like Variable::Strongly::Typed, it probably would be of little help. As best I can tell, Variable::Strongly::Typed, only prevents you from assigning the wrong type of value to variables. It does not try to prevent implicit stringification of numbers nor numification of strings. Also, the documentation implies it uses a regex to determine if a value is a number.
There is also typesafety, but the documentation says it's for objects, so it may also be of little help.
Also, there is PerlGP, which claims to provide strong typing. Never heard of it before now, so I don't know just what it provides.
| [reply] |