NAME
Regexp::Parser::Hierarchy - builds the Regexp::Parser hierarchy
SYNOPSIS
package MyRxPkg;
use base 'Regexp::Parser';
use Regexp::Parser::Hierarchy;
# or
use Regexp::Parser::Hierarchy (
__object__ => [qw( new_top_level_nodes )],
anchor => [qw( new_anchors )],
assertion => [qw( new_assertions )],
branch => [qw( new_branches )],
);
DESCRIPTION
Use this module after use base 'Regexp::Parser'
to install the object hierarchy for your class.
If you are introducing new objects, you need to declare them here. As the example in the synopsis shows, you pass a list of pairs. Each pair is an abstract class and an array reference of the new objects that inherit from it.
If you are creating a new top-level object, you put it in the array reference for __object__. If you are creating a new anchor object, you put it in the array reference for anchor. If you are creating an entire new abstract class and elements for it, include the abstract class in the __object__ array reference, and put its sub-classes in its array reference:
use Regexp::Parser::Hierarchy (
__object__ => [qw( jump )],
jump => [qw( skip hop leap )],
);
SEE ALSO
Regexp::Parser, Regexp::Parser::Handlers, Regexp::Parser::Objects.
AUTHOR
Jeff japhy
Pinyan, japhy@perlmonk.org
COPYRIGHT
Copyright (c) 2004 Jeff Pinyan japhy@perlmonk.org. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.