Hi,
How does one make use of Regexp::Grammars "<log: ...>" directive? I presumed that the following code should output "via log" to the logfile (STDERR in this case) but it never appears.
#!/usr/bin/env perl use v5.32.01; use Data::Dumper; my $parser = do { use Regexp::Grammars; qr{ <logfile: - > <nocontext:> <Yada> <token: Yada> <log: via log> # <warning: via warning> <error: via error> <fatal: via fatal> yada }ixms; if ('yada' =~ $parser) { warn Data::Dumper->new([\@!,\%/],[qw(*! */)])->Deepcopy(1)->Indent +(1)->Maxdepth(0)->Sortkeys(1)->Dump(),q{ }; } else { say {*STDERR} $_ for @!; # i.e. report all errors };
In reply to Regexp::Grammars' <log: ...> directive by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |