EXTUTILS::TYPEMAPS::CMD(3perl)
β¨ NAME β¨
ExtUtils::Typemaps::Cmd π
β quick lil commands for handling typemaps, bestie. It's a helper situation, no cap.
(Also, hi, this is page ExtUtils::Typemaps::Cmd from section 3perl, a.k.a. the Perl Programmers Reference Guide. Bookmark it π)
πΈ SYNOPSIS πΈ
From XS:
INCLUDE_COMMAND: $^X -MExtUtils::Typemaps::Cmd \
-e "print embeddable_typemap(q{Excommunicated})"
So what's happening here is: it loads ExtUtils::Typemaps::Excommunicated, makes an object out of it, and dumps it as an embeddable typemap so you can use it literally right there in your XS file. Iconic behavior fr fr π
π¦ DESCRIPTION π¦
Okay so this is a helper module for ExtUtils::Typemaps β it exists for quick one-liners, specifically so you can pull shared typemaps that live on CPAN into an XS file (peep the SYNOPSIS, it's giving exactly that).
And because that's the whole point of it, these functions are exported by default, no asking required:
π EXPORTED FUNCTIONS π
π embeddable_typemap
Give it a list of identifiers and embeddable_typemap will try to load typemaps from a file with the given name(s), or from a module that is an ExtUtils::Typemaps subclass. She's flexible like that β¨
It returns a string representation of the merged typemaps that you can include verbatim into XS. Example time:
print embeddable_typemap(
"Excommunicated", "ExtUtils::Typemaps::Basic", "./typemap"
);
So here's the tea on what that actually does, argument by argument π«:
- It'll try to load the module
ExtUtils::Typemaps::Excommunicatedand use it as anExtUtils::Typemapssubclass. - If that fails, it'll try loading
Excommunicatedas a module. - If that fails, it'll try to read a file called
Excommunicated. - For the second argument it works similarly β same energy, same fallbacks.
- But the third one? Nope, different vibe: it'll be loaded as a file first. π
And once all the typemap files or modules are loaded, it merges them in the specified order and dumps the result as an embeddable typemap. Chef's kiss, merged and served π
π₯ SEE ALSO π₯
ExtUtils::Typemapsperlxs
π AUTHOR π
Steffen Mueller "<smueller@cpan.org>" β legend behavior, we stan π«Ά
π COPYRIGHT & LICENSE π
Copyright 2012 Steffen Mueller
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay bestie that's the whole page, you ate it, go write some typemaps πβ¨
Perl v5.44.0, dated 2026-10-17 β that's the source and version, mwah, bye bye ππΈ
π¦ 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