/usr/share/perl5/Pegex/Regex.pod is in libpegex-perl 0.64-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | =pod
=for comment
DO NOT EDIT. This Pod was generated by Swim v0.1.45.
See http://github.com/ingydotnet/swim-pm#readme
=encoding utf8
=head1 NAME
Pegex::Regex - Use Pegex Like a Regex
=head1 SYNOPSIS
{
# Turn on Pegex regular expressions in lexical scope.
use Pegex::Regex;
my $grammar = qr{$grammar_text}x;
$text =~ $grammar;
my $result = \%/;
# Turn off Pegex in this scope.
no Pegex::Regex;
}
=head1 DESCRIPTION
This is a trivial sugar module that lets you use Pegex parser grammars like
regular expressions, if you're into that kind of thing.
This is basically a clone of Damian Conway's L<Regexp::Grammars> module API.
You put a grammar into a C<qr{...}x> and apply it the input string you want
to parse. If the parse is successful, you get a data structure of the
content in C<%/>.
IMHO, building a recursive decscent parser entirely inside of a regular
expression, is not the clearest way to code. But, of course, TMTOWTDI. :)
=head1 NOTE
This module is just for experimental fun. See L<Pegex> for the right way to
use the Pegex parsing framework.
=head1 TMTOWTDI
Here's a Pegex::Regex code snippet:
use Pegex::Regex;
$text =~ qr{... Pegex grammar text ...};
$data = \%/;
And the equivalent Pegex code:
use Pegex;
my $data = pegex('... Pegex grammar text ...')->parse($text);
=head1 WARNING
This gateway drug, er, module, technically should not even work.
It turns your "grammar inside a regexp" into a Pegex::Grammar using qr{}
overloading, and then turns your regexp itself into a shim that calls the
parse method for you. This is highly magical and technically makes a reentrant
call to the regex engine, which is not supported yet. Use at your own risk.
Better yet, do yourself a favor and learn how to use the Pegex toolset without
this ::Regex sugar. C<:-)>
=head1 SEE ALSO
=over
=item * L<Pegex>
=item * L<Regexp::Grammars>
=back
=head1 AUTHOR
Ingy döt Net <ingy@cpan.org>
=head1 COPYRIGHT AND LICENSE
Copyright 2010-2017. Ingy döt Net.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
See L<http://www.perl.com/perl/misc/Artistic.html>
=cut
|