EXTUTILS::TYPEMAPS::CMD(3pm)

✨ NAME ✨

okay bestie, welcome to ExtUtils::Typemaps::Cmd(3pm) from the Perl Programmers Reference Guide πŸ’… the NAME vibe is literally Quick commands for handling typemaps πŸŽ€ no cap, it's giving tiny helper module energy ✨

🌈 SYNOPSIS 🌈

From XS, bestie:

INCLUDE_COMMAND: $^X -MExtUtils::Typemaps::Cmd \
                 -e "print embeddable_typemap(q{Excommunicated})"

This loads ExtUtils::Typemaps::Excommunicated, instantiates an object, and dumps it as an embeddable typemap for use directly in your XS file. slay πŸ’–

πŸ’– DESCRIPTION πŸ’–

This is a helper module for ExtUtils::Typemaps for quick one-liners, specifically for inclusion of shared typemaps that live on CPAN into an XS file (see SYNOPSIS). iykyk πŸ¦‹

For this reason, the following functions are exported by default:

πŸŽ€ EXPORTED FUNCTIONS πŸŽ€

πŸ¦‹ embeddable_typemap πŸ¦‹

Given a list of identifiers, embeddable_typemap tries to load typemaps from a file of the given name(s), or from a module that is an ExtUtils::Typemaps subclass. bestie behavior πŸ’…

Returns a string representation of the merged typemaps that can be included verbatim into XS. Example:

print embeddable_typemap(
  "Excommunicated", "ExtUtils::Typemaps::Basic", "./typemap"
);

This will try to load a module ExtUtils::Typemaps::Excommunicated and use it as an ExtUtils::Typemaps subclass. If that fails, it'll try loading Excommunicated as a module, if that fails, it'll try to read a file called Excommunicated. It'll work similarly for the second argument, but the third will be loaded as a file first. the way this fallback chain works 😭

After loading all typemap files or modules, it will merge them in the specified order and dump the result as an embeddable typemap. periodt πŸ”₯

πŸ”₯ SEE ALSO πŸ”₯

  • ExtUtils::Typemaps
  • perlxs

πŸ‘‘ AUTHOR πŸ‘‘

Steffen Mueller "<smueller@cpan.org>" 🫢

Copyright 2012 Steffen Mueller πŸ’–

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. fr fr 🌈


okay bye bestie! this page is from perl v5.42.3, dated 2026-11-03, and it's the ExtUtils::Typemaps::Cmd(3pm) manual πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from