Devel::CallChecker

Custom op checking attached to subroutines
Download

Devel::CallChecker Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Andrew Main
  • Publisher web site:
  • http://search.cpan.org/~zefram/

Devel::CallChecker Tags


Devel::CallChecker Description

Custom op checking attached to subroutines Devel::CallChecker is a Perl module that makes some new features of the Perl 5.14.0 C API available to XS modules running on older versions of Perl. The features are centred around the function cv_set_call_checker, which allows XS code to attach a magical annotation to a Perl subroutine, resulting in resolvable calls to that subroutine being mutated at compile time by arbitrary C code. This module makes cv_set_call_checker and several supporting functions available. (It is possible to achieve the effect of cv_set_call_checker from XS code on much earlier Perl versions, but it is painful to achieve without the centralised facility.)This module provides the implementation of the functions at runtime (on Perls where they are not provided by the core), and also at compile time supplies the C header file which provides access to the functions.SYNOPSIS # to generate header prior to XS compilation perl -MDevel::CallChecker=callchecker0_h \ -e 'print callchecker0_h' > callchecker0.h # in Perl part of module use Devel::CallChecker; /* in XS */ #include "callchecker0.h" cv_get_call_checker(cv, &ckfun, &ckobj); static OP *my_ckfun(pTHX_ OP *o, GV *namegv, SV *ckobj); cv_set_call_checker(cv, my_ckfun, ckobj); Requirements: · Perl


Devel::CallChecker Related Software