Dist::...:Export(3pm)

πŸ’… NAME πŸ’…

Dist::Build::XS::Export β€” a Dist::Build extension that exports headers so other XS modules can use them 🫢

(also hi, you're reading the Dist::...:Export(3pm) page from the User Contributed Perl Documentation, welcome, sit down, stay a while ✨)

🌸 VERSION 🌸

version 0.028 β€” that's the one, no cap.

πŸ¦‹ SYNOPSIS πŸ¦‹

load_extension('Dist::Build::XS::Export');
export_headers(
    module => 'Foo::Bar',
    dir    => 'include',
);

Like, that's literally it. Two lines and your headers are out in the world living their best life πŸ’–

πŸŽ€ DESCRIPTION πŸŽ€

Okay so. This Dist::Build extension exports headers for your module, so that other modules can actually use them via Dist::Build::Import. It's giving sharing is caring, it's giving community, it's giving "your header files deserve main character energy too" πŸ‘‘

⭐ METHODS ⭐

πŸ“ export_headers

This copies the given header for the appropriate module to the appropriate sharedir. (The original page says "approriate" β€” we don't gatekeep typos here, but that's the vibe 😭✨)

  • module β€” the name of the module to export. Defaults to the main module. iykyk πŸ’«
  • dir β€” the directory to export, e.g. 'include' πŸ“
  • file β€” a file (or a whole list of files, she's flexible) to export, e.g. 'foo.h' πŸ“„
⚠️ At least one of dir and file must be defined. Non-negotiable bestie. And note that this function can be called multiple times β€” e.g. for multiple modules β€” so go off, call it as many times as you need πŸ’…

🌈 export_typemap

This exports the typemap of this module. Slay 🧚

  • module β€” the name of the module to export. Defaults to the main module, same as always πŸ’œ
  • filename β€” the name of the typemap. Defaults to typemap. Iconic default behavior, honestly.

πŸ”₯ export_flags

This stores the given flags for the module in the appropriate sharedir. The module can be set using the module named argument, but will default to the main module of the dist β€” she's got a mind of her own but she's predictable πŸ’–

The include_dirs, defines, extra_compiler_flags, libraries, library_dirs, and extra_linker_flags arguments are all stored as-is. No edits, no notes, no "let me just tweak this" β€” as-is, periodt 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Leon Timmermans <fawaka@gmail.com> β€” the icon, the legend, the whole vibe ⭐

This software is copyright (c) 2024 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Free software fr fr, go wild (responsibly) 🌸


πŸŽ€ okay that's the whole page, you ate that. This was perl v5.40.1, dated 2026-03-21, and you've been reading Dist::...:Export(3pm) β€” mwah, bye bestie! πŸ’…πŸ’–βœ¨
πŸ“¦ where this page comes from