B::Hoo...PPAddr(3pm)
π B::Hooks::OP::PPAddr π
okay bestie, so this is a perl manual page (section 3pm, in case the header didn't spill the tea) and it's about hooking into opcode execution. yes, the real stuff. no cap.
β¨ NAME β¨
B::Hooks::OP::PPAddr β hook into opcode execution πͺ
πΈ VERSION πΈ
version 0.06 (yes queen, it's giving stable-ish)
π¦ SYNOPSIS π¦
here's the vibe, copy it exactly bestie:
#include "hook_op_check.h"
#include "hook_op_ppaddr.h"
STATIC OP *
execute_entereval (pTHX_ OP *op, void *user_data) {
...
}
STATIC OP *
check_entereval (pTHX_ OP *op, void *user_data) {
hook_op_ppaddr (op, execute_entereval, NULL);
}
hook_op_check (OP_ENTEREVAL, check_entereval, NULL);
that's literally it. chef's kiss π
π DESCRIPTION π
so this module hands your XS modules a C API so they can hook into the execution of perl opcodes. main character energy for your extension module, fr fr.
ExtUtils::Depends is used to export all the functions so other XS modules can use them. drop this into your Makefile.PL:
my $pkg = ExtUtils::Depends->new('Your::XSModule', 'B::Hooks::OP::PPAddr');
WriteMakefile(
... # your normal makefile flags
$pkg->get_makefile_vars,
);
and boom π₯ β your XS module can now #include "hook_op_ppaddr.h". slay.
π TYPES π
OP
typedef OP *(*hook_op_ppaddr_cb_t) (pTHX_ OP *, void *user_data)
this is the type your callbacks need to implement. no exceptions bestie, it's the whole assignment. β¨
π FUNCTIONS π
hook_op_ppaddr
void hook_op_ppaddr (OP *op, hook_op_ppaddr_cb_t cb, void *user_data)
this one swaps out the function that executes op and replaces it with the callback cb. and user_data? it gets passed to the callback as the last argument. just like that. π«Ά
hook_op_ppaddr_around
void hook_op_ppaddr_around (OP *op, hook_op_ppaddr_cb_t before, hook_op_ppaddr_cb_t after, void *user_data)
registers the callbacks before and after so they get called before and after the execution of op. yeah, you get BOTH sides. obsessed. π and yup β user_data gets passed to the callback as the last argument. same deal as above.
π SEE ALSO π
B::Hooks::OP::Check
π SUPPORT π
bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=B-Hooks-OP-PPAddr> (or bug-B-Hooks-OP-PPAddr@rt.cpan.org <mailto:bug-B-Hooks-OP-PPAddr@rt.cpan.org>).
ngl if something's broken, tell the tracker, not your group chat. they actually fix things. π
π§ AUTHOR π§
Florian Ragwitz <rafl@debian.org>
β CONTRIBUTORS β
- Karen Etheridge <ether@cpan.org>
- Alexandr Ciornii <alexchorny@gmail.com>
- Stephan Loyd <stephanloyd9@gmail.com>
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2008 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie β¨ this was generated by perl v5.42.3 on 2026-08-19, and yeah the manual name got mangled to B::Hoo...PPAddr(3pm) in the footer but we all know who she is. periodt. π
π¦π
π¦ where this page comes from
- ubuntu stonking: libb-hooks-op-ppaddr-perl 0.06-3build5 Β· Artistic-1.0-Perl OR 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