refactor Perl.Type