Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    re::engine::Hooks 0.02

    Download button

    No screenshots available
    Downloads: 90  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Vincent Pit | More programs
    Perl Artistic License / FREE
    September 8th, 2012, 19:54 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    re::engine::Hooks description

    Hookable variant of the Perl core regular expression engine

    re::engine::Hooks is a Perl module that provides a version of the Perl regexp engine that can call user-defined XS callbacks at the compilation and at the execution of each regexp node.

    SYNOPSIS

    In your XS file :

     #include "re_engine_hooks.h"

     STATIC void dri_comp_hook(pTHX_ regexp *rx, regnode *node) {
     ...
     }

     STATIC void dri_exec_hook(pTHX_ regexp *rx, regnode *node,
     regmatch_info *info, regmatch_state *state) {
     ...
     }

     MODULE = Devel::Regexp::Instrument PACKAGE = Devel::Regexp::Instrument

     BOOT:
     {
     reh_register("Devel::Regexp::Instrument", dri_comp_hook, dri_exec_hook);
     }


    In your Perl module file :

     package Devel::Regexp::Instrument;

     use strict;
     use warnings;

     our ($VERSION, @ISA);

     use re::engine::Hooks; # Before loading our own shared library

     BEGIN {
     $VERSION = '0.01';
     require DynaLoader;
     push @ISA, 'DynaLoader';
     __PACKAGE__->bootstrap($VERSION);
     }

     sub import { re::engine::Hooks::enable(__PACKAGE__) }

     sub unimport { re::engine::Hooks::disable(__PACKAGE__) }

     1;


    In your Makefile.PL

     use ExtUtils::Depends;

     my $ed = ExtUtils::Depends->new(
     'Devel::Regexp::Instrument' => 're::engine::Hooks',
     );

     WriteMakefile(
     $ed->get_makefile_vars,
     ...
     );



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    XS callbacks | Perl module | Perl | XS | callbacks

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM