Filewatcher File Search File Search
Catalog
Content Search
» » » » libb-hooks-parser-perl_0.09.orig.tar.gz » Content »
pkg://libb-hooks-parser-perl_0.09.orig.tar.gz:67510/B-Hooks-Parser-0.09/  info  downloads

README

NAME
    B::Hooks::Parser - Interface to perls parser variables

DESCRIPTION
    This module provides an API for parts of the perl parser. It can be used
    to modify code while it's being parsed.

Perl API
  setup()
    Does some initialization work. This must be called before any other
    functions of this module if you intend to use "set_linestr". Returns an
    id that can be used to disable the magic using "teardown".

  teardown($id)
    Disables magic registed using "setup".

  get_linestr()
    Returns the line the parser is currently working on, or undef if perl
    isn't parsing anything right now.

  get_linestr_offset()
    Returns the position within the current line to which perl has already
    parsed the input, or -1 if nothing is being parsed currently.

  set_linestr($string)
    Sets the line the perl parser is currently working on to $string.

    Note that perl won't notice any changes in the line string after the
    position returned by "get_linestr_offset".

    Throws an exception when nothing is being compiled.

  inject($string)
    Convenience function to insert a piece of perl code into the current
    line string (as returned by "get_linestr") at the current offset (as
    returned by "get_linestr_offset").

C API
    The following functions work just like their equivalent in the perl api.

  hook_op_check_id hook_parser_setup (void)
  void hook_parser_teardown (hook_op_check_id id)
  const char *hook_parser_get_linestr (pTHX)
  IV hook_parser_get_linestr_offset (pTHX)
  hook_parser_set_linestr (pTHX_ const char *new_value)
AUTHOR
    Florian Ragwitz <rafl@debian.org>

COPYRIGHT AND LICENSE
    Copyright (c) 2008 Florian Ragwitz

    This module is free software.

    You may distribute this code under the same terms as Perl itself.

Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017 FileWatcher.com