ExtUti...jectMap(3pm)
πΈ NAME πΈ
okay so this is the ExtUti...jectMap(3pm) page from User Contributed Perl Documentation, and the actual module is ExtUtils::Typemaps::ObjectMap β literally a set of typemaps for opaque C/C++ objects. Bestie, it's giving exactly what it says on the tin. π
β¨ SYNOPSIS β¨
okay bestie, the whole workflow is: read your own type maps, merge the object map set into them, then write the combined map out. No cap, here's the exact code:
use ExtUtils::Typemaps::ObjectMap;
# First, read my own type maps:
my $private_map = ExtUtils::Typemaps->new(file => 'my.map');
# Then, get the object map set and merge it into my maps
$private_map->merge(typemap => ExtUtils::Typemaps::ObjectMap->new);
# Now, write the combined map to an output file
$private_map->write(file => 'typemap');
π¦ DESCRIPTION π¦
ExtUtils::Typemaps::ObjectMap is an ExtUtils::Typemaps subclass, and it provides a set of mappings for using pointers to C/C++ objects as opaque objects from Perl. It's giving "Perl can hold your C/C++ object pointers" energy, and honestly? Obsessed. π
These mappings are taken verbatim from Dean Roehrich's perlobject.map. They are:
# "perlobject.map" Dean Roehrich, version 19960302
#
# TYPEMAPs
#
# HV * -> unblessed Perl HV object.
# AV * -> unblessed Perl AV object.
#
# INPUT/OUTPUT maps
#
# O_* -> opaque blessed objects
# T_* -> opaque blessed or unblessed objects
#
# O_OBJECT -> link an opaque C or C++ object to a blessed Perl object.
# T_OBJECT -> link an opaque C or C++ object to an unblessed Perl object.
# O_HvRV -> a blessed Perl HV object.
# T_HvRV -> an unblessed Perl HV object.
# O_AvRV -> a blessed Perl AV object.
# T_AvRV -> an unblessed Perl AV object.
π METHODS π
These are the overridden methods, bestie:
π new π
Creates a new ExtUtils::Typemaps::ObjectMap object. It acts as any other ExtUtils::Typemaps object, except that it has the object maps initialized. So yeah, same behavior energy, but the object maps are already set up. Periodt. β¨
π SEE ALSO π
ExtUtils::TypemapsExtUtils::Typemaps::DefaultExtUtils::Typemaps::STL::String
π AUTHOR π
The module was written by Steffen Mueller (Steffen Mueller <smueller@cpan.org>), but the important bit, the typemap, was written by Dean Roehrich. Like, respect the typemap royalty, bestie. π«Ά
π COPYRIGHT AND LICENSE π
Copyright 2010, 2011, 2012, 2013 by Steffen Mueller
Except for the typemap code, which is copyright 1996 Dean Roehrich
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page, bestie! π This one is from perl v5.36.0, dated 2022-10-21, and it's the ExtUti...jectMap(3pm) manual page. Slay. π
π¦ where this page comes from
- ubuntu noble: libextutils-typemaps-default-perl 1.05-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libextutils-typemaps-default-perl 1.05-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libextutils-typemaps-default-perl 1.05-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms