ExtUtils::Typemaps(3p) Perl Programmers Reference Guide
ExtUtils::Typemaps(3p) Perl Programmers Reference Guide # ExtUtils::Typemaps(3p) Perl Programmers Reference Guide NNAAMMEE # ExtUtils::Typemaps - Read/Write/Modify Perl/XS typemap files SSYYNNOOPPSSIISS # # read/create file my $typemap = ExtUtils::Typemaps->new(file => 'typemap'); # alternatively create an in-memory typemap # $typemap = ExtUtils::Typemaps->new(); # alternatively create an in-memory typemap by parsing a string # $typemap = ExtUtils::Typemaps->new(string => $sometypemap); # add a mapping $typemap->add_typemap(ctype => 'NV', xstype => 'T_NV'); $typemap->add_inputmap( xstype => 'T_NV', code => '$var = ($type)SvNV($arg);' ); $typemap->add_outputmap( xstype => 'T_NV', code => 'sv_setnv($arg, (NV)$var);' ); $typemap->add_string(string => $typemapstring); # will be parsed and merged # remove a mapping (same for remove_typemap and remove_outputmap. ...