TYPEMAP Car * ANY_OBJECT OUTPUT ANY_OBJECT sv_setref_pv($arg, CLASS, (void*) $var); INPUT ANY_OBJECT $var = ($type) SvIV((SV*)SvRV($arg));