| 1 |
PPIx-Regexp is Copyright (C) 2009-2023, 2025-2026 by Thomas R. Wyant, III |
| 2 |
|
| 3 |
DESCRIPTION |
| 4 |
|
| 5 |
This package parses regular expressions as they appear in Perl scripts, |
| 6 |
generating a structure similar to the structure generated by PPI when it |
| 7 |
parses a Perl script, and navigable in much the same way. |
| 8 |
|
| 9 |
The PPIx::Regexp object is instantiated using either new() or |
| 10 |
new_from_cache(). Either way, you must pass it a regular expression, |
| 11 |
either as a string or as one of the three relevant PPI objects: |
| 12 |
PPI::Token::StringLike::Regexp, PPI::Token::Regexp::Match, or |
| 13 |
PPI::Token::Regexp::Substitute. In the case of new_from_cache(), only |
| 14 |
one PPIx::Regexp object will be generated from a given PPI object; |
| 15 |
subsequent calls with the same PPI object will return the same |
| 16 |
PPIx::Regexp object. |
| 17 |
|
| 18 |
See the eg directory for samples. |
| 19 |
|
| 20 |
INSTALLATION |
| 21 |
|
| 22 |
This module is installable by either of the two usual incantations: |
| 23 |
|
| 24 |
tar -xzf PPIx-Regexp-9.999.tar.gz |
| 25 |
cd PPIx-Regexp-9.999 |
| 26 |
perl Makefile.PL |
| 27 |
make |
| 28 |
make test |
| 29 |
sudo make install |
| 30 |
|
| 31 |
or |
| 32 |
|
| 33 |
tar -xzf PPIx-Regexp-9.999.tar.gz |
| 34 |
cd PPIx-Regexp-9.999 |
| 35 |
perl Build.PL |
| 36 |
./Build |
| 37 |
./Build test |
| 38 |
sudo ./Build install |
| 39 |
|
| 40 |
Of course, since it is pure Perl, in desperation you can simply drop the |
| 41 |
files from the lib directory of the distribution into the appropriate |
| 42 |
@INC directory. |
| 43 |
|
| 44 |
LICENSING INFORMATION |
| 45 |
|
| 46 |
This package is free software; you can redistribute it and/or modify it |
| 47 |
under the same terms as Perl 5.10.0. For more details, see the full text |
| 48 |
of the licenses in the directory LICENSES. |
| 49 |
|
| 50 |
This program is distributed in the hope that it will be useful, but |
| 51 |
without any warranty; without even the implied warranty of |
| 52 |
merchantability or fitness for a particular purpose. |