ExtUtils::Typemaps::OutputMap - Entry in the OUTPUT section of a typemap
use ExtUtils::Typemaps;...my $output = $typemap->get_output_map('T_NV');my $code = $output->code();$output->code("...");Refer toExtUtils::Typemaps for details.
Requiresxstype andcode parameters.
Returns or sets the OUTPUT mapping code for this entry.
Returns the name of the XS type of the OUTPUT map.
Returns a cleaned-up copy of the code to which certain transformations have been applied to make it more ANSI compliant.
This is an obscure optimization that used to live inExtUtils::ParseXS directly.
In a nutshell, this will check whether the output code involves callingset_iv,set_uv,set_nv,set_pv orset_pvn to set the special$arg placeholder to a new valueAT THE END OF THE OUTPUT CODE. If that is the case, the code is eligible for using theTARG-related macros to optimize this. Thus the name of the method:targetable.
If the optimization can not be applied, this returns undef. If it can be applied, this method returns a hash reference containing the following information:
type: Any of the characters i, u, n, pwith_size: Bool indicating whether this is the sv_setpvn variantwhat: The code that actually evaluates to the output scalarwhat_size: If "with_size", this has the string length (as code, not constant)Steffen Mueller<smueller@cpan.org>
Copyright 2009, 2010, 2011, 2012 Steffen Mueller
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.
The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.