The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::Filter::Dispatcher::Compiler - Compile rulesets in to code

SYNOPSIS

    use XML::Filter::Dispatcher::Compiler qw( xinline );

    my $c = XML::Filter::Dispatcher::Compiler->new( ... )

    my $code = $c->compile(
        Package     => "My::Filter",
        Rules       => [
            'a/b/c'     => xinline q{warn "found a/b/c"},
        ],
        Output      => "lib/My/Filter.pm",  ## optional
    );

DESCRIPTION

Most of the options from XML::Filter::Dispatcher are accepted.

NOTE: you cannot pass code references to compile() if you want to write the $code to disk, they will not survive. If you want to eval $code, this is ok.

METHODS

xinline

Hints to X::F::D that the string is inlinable code. This is a requirement when using the compiler and is so far (v.52) ignored elswhere. In xinlined code, $self refers to the current dispatcher and $e refers to the current event's data. Or you can get that yourself in $_[0] and $_[1] as in a normal SAX event handling method.

compile

Accepts options that extend and override any previously set for the duration of the compile(), including the ruleset to compile.

LIMITATIONS

COPYRIGHT

    Copyright 2003, R. Barrie Slaymaker, Jr., All Rights Reserved

LICENSE

You may use this module under the terms of the BSD, Artistic, or GPL licenses, any version.

AUTHOR

Barrie Slaymaker <barries@slaysys.com>