EXTUTILS::PARSEXS::EVAL(3perl)

πŸ’– ExtUtils::ParseXS::Eval πŸ’–

okay bestie, welcome to ExtUtils::ParseXS::Eval, the manual page (section 3perl ofc) and like… it's a clean package to evaluate code in. that's the whole vibe. it's a little helper package that exists so you can eval stuff somewhere tidy instead of dumping all your temporaries into someone else's namespace and making it messy. iconic behavior honestly 🫢


✨ NAME ✨

ExtUtils::ParseXS::Eval β€” Clean package to evaluate code in πŸ’…

so yeah, the name is literally the mission statement. it's a package, it's clean, and its job is to be the place where code gets evaluated. that's it, that's the girl.


🌸 SYNOPSIS 🌸

  use ExtUtils::ParseXS::Eval;
  my $rv = ExtUtils::ParseXS::Eval::eval_typemap_code(
    $parsexs_obj, "some Perl code"
  );

see? you use it, you call ExtUtils::ParseXS::Eval::eval_typemap_code with a $parsexs_obj and a string of Perl code, and you get a return value back. no cap, that's the whole intro. πŸ”₯


πŸ¦‹ SUBROUTINES πŸ¦‹

$pxs->eval_output_typemap_code($typemapcode, $other_hashref)

okay so this one sets up various bits of previously global state (they used to be ExtUtils::ParseXS package variables, rip to them) so that it can eval output typemap code that may refer to these variables. giving "i prepared the whole room for you before you walked in" energy πŸ’–

it warns the contents of $@ if any β€” so if your eval blew up, you will hear about it, bestie. no silent failures here. 😭

and now the part we need to talk about: not all these variables are necessarily considered "public" wrt. use in typemaps, so beware. fr fr, tread carefully. the variables that get set up from $other_hashref are:

  $Package $func_name $Full_func_name $pname
  $var $type $ntype $subtype $arg $ALIAS

those ten. that's the list. memorize it or don't, but it's there. πŸ‘‘

$pxs->eval_input_typemap_code($typemapcode, $other_hashref)

again with the glow-up: it sets up various bits of previously global state (formerly ExtUtils::ParseXS package variables, yes, them again) for eval'ing output typemap code that may refer to these variables. 🧚

also warns the contents of $@ if any. same energy, same warning, same "please check your errors" reminder.

also same disclaimer: not all these variables are necessarily considered "public" wrt. use in typemaps, so beware. ⚠️

variables set up from $other_hashref this time:

  $Package $func_name $Full_func_name $pname
  $var $type $ntype $subtype $num $init $printed_name $arg $argoff $ALIAS

yep, that's the input-flavored roster β€” it's got $num, $init, $printed_name and $argoff extra compared to the output one. different girl, different set. πŸŽ€


πŸ’€ TODO πŸ’€

eventually, with better documentation and possible some cleanup, this could be part of "ExtUtils::Typemaps". so like… future goals. manifesting it. ✨


🌈 sign-off 🌈

that's the whole page, bestie! this one's from perl v5.44.0, dated 2026-10-17, and it lives in the ExtUti...S::Eval(3perl) manual. go forth and eval responsibly πŸ’œπŸ«Ά

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms