reh_exec_node_hook

reh_config

A typedef'd struct that holds a set of all the different callbacks publicized by this module. It has the following members :

comp_node

A function pointer of type reh_comp_node_hook that will be called each time a regnode is compiled. Allowed to be NULL if you don't want to call anything for this phase.

exec_node

A function pointer of type reh_exec_node_hook that will be called each time a regnode is executed. Allowed to be NULL if you don't want to call anything for this phase.

reh_register

void reh_register(pTHX_ const char *key, reh_config *cfg);

Registers the callbacks specified by the reh_config * object cfg under the given name key. cfg can be a pointer to a static object of type reh_config. key is expected to be a nul-terminated string and should match the argument passed to "enable" and "disable" in Perl land. An exception will be thrown if key has already been used to register callbacks.

PERL API

enable

enable $key;

Lexically enables the hooks associated with the key $key.

disable

disable $key;

Lexically disables the hooks associated with the key $key.

EXAMPLES

Please refer to the t/re-engine-Hooks-TestDist/ directory in the distribution. It implements a couple of simple examples.

DEPENDENCIES

Any stable release of perl since 5.10.1, or a development release of perl from the 5.19 branch.

A C compiler. This module may happen to build with a C++ compiler as well, but don't rely on it, as no guarantee is made in this regard.

SUPPORT

COPYRIGHT & LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Except for the contents of the src/5* directories which are slightly modified versions of files extracted from the perl distribution and are

Copyright 1987-2014, Larry Wall, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of either the GNU General Public License (version 1 or, at your option, any later version), or the Artistic License (see perlartistic).

Module Install Instructions

To install re::engine::Hooks, simply copy and paste either of the commands in to your terminal