Compiler
NAME
Apache::LogFormat::Compiler - Compiles Log Format Into Apache::LogFormat::Formatter
SYNOPSIS
use Apache::LogFormat::Compiler;
my $c = Apache::LogFormat::Compiler.new;
my $fmt = $c.compile(' ... pattern ... ');
my $line = $fmt.format(%env, @res, $length, $reqtime, $time);
$*ERR.print($line);
DESCRIPTION
Apache::LogFormat::Compiler compiles an Apache-style log format string into efficient perl6 code. It was originally written for perl5 by kazeburo.
METHODS
new(): $compiler:Apache::LogFormat::Compiler
Creates a new parser. The parser is stateless, so you can reuse it as many times to compile log patterns.
compile($pat:String, %extra-block-handlers:Hash(Str,Callable), %extra-char-handlers:Hash(Str,Callable)) $fmt:Apache::LogFormat::Formatter
Compiles the pattern into an executable formatter object.
AUTHOR
Daisuke Maki <[email protected]>
COPYRIGHT AND LICENSE
Copyright 2015 Daisuke Maki
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.