B::Hooks::OP::PPAddr(3pm)

B::Hooks::OP::PPAddr3pm

Hook into opcode execution

Usage

    #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);

Version

version 0.06

Overview

This module provides a C API for XS modules to hook into the execution of perl opcodes.

ExtUtils::Depends is used to export all functions for other XS modules to use. Include the following in your Makefile.PL:

    my $pkg = ExtUtils::Depends->new('Your::XSModule', 'B::Hooks::OP::PPAddr');
    WriteMakefile(
        ... # your normal makefile flags
        $pkg->get_makefile_vars,
    );

Your XS module can now include "hook_op_ppaddr.h".

Types

Op

    typedef OP *(*hook_op_ppaddr_cb_t) (pTHX_ OP *, void *user_data)

Type that callbacks need to implement.

Functions

hook_op_ppaddr

    void hook_op_ppaddr (OP *op, hook_op_ppaddr_cb_t cb, void *user_data)

Replace the function to execute "op" with the callback "cb". "user_data" will be passed to the callback as the last argument.

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)

Register the callbacks "before" and "after" to be called before and after the execution of "op". "user_data" will be passed to the callback as the last argument.

Support

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=B-Hooks-OP-PPAddr> (or [email protected] <mailto:[email protected]>).

Contributors

•

Karen Etheridge <[email protected]>

•

Alexandr Ciornii <[email protected]>

•

Stephan Loyd <[email protected]>

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Author

Florian Ragwitz <[email protected]>

From libb-hooks-op-ppaddr-perl 0.06-3+b3 in Debian 13 (Trixie). Parsed by carta from the page's man source.