Add support for explicit type conversion to double & int

This addresses PERL-227 in Jira.