GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
B::Hooks::OP::Check(3) User Contributed Perl Documentation B::Hooks::OP::Check(3)

B::Hooks::OP::Check - Wrap OP check callbacks

version 0.22

    # include "hook_op_check.h"

    STATIC OP *my_const_check_op (pTHX_ OP *op, void *user_data) {
        /* ... */
        return op;
    }

    STATIC hook_op_check_id my_hook_id = 0;

    void
    setup ()
        CODE:
            my_hook_id = hook_op_check (OP_CONST, my_const_check_op, NULL);

    void
    teardown ()
        CODE:
            hook_op_check_remove (OP_CONST, my_hook_id);

This module provides a C API for XS modules to hook into the callbacks of "PL_check".

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::Check');
    WriteMakefile(
        ... # your normal makefile flags
        $pkg->get_makefile_vars,
    );

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

Type that callbacks need to implement.

Type to identify a callback.

Register the callback "cb" to be called after the "PL_check" function for opcodes of the given "type". "user_data" will be passed to the callback as the last argument. Returns an id that can be used to remove the callback later on.

Remove the callback identified by "id". Returns the user_data that the callback had.

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

Florian Ragwitz <rafl@debian.org>

  • Karen Etheridge <ether@cpan.org>
  • Zefram <zefram@fysh.org>
  • Alexandr Ciornii <alexchorny@gmail.com>

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.

2017-07-31 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.