1PPIx::Regexp::Token::CoUdsee(r3)Contributed Perl DocumenPtPaItxi:o:nRegexp::Token::Code(3)
2
3
4

NAME

6       PPIx::Regexp::Token::Code - Represent a chunk of Perl embedded in a
7       regular expression.
8

SYNOPSIS

10        use PPIx::Regexp::Dumper;
11        PPIx::Regexp::Dumper->new(
12            'qr{(?{print "hello sailor\n"})}smx')->print;
13

INHERITANCE

15       "PPIx::Regexp::Token::Code" is a PPIx::Regexp::Token.
16
17       "PPIx::Regexp::Token::Code" is the parent of
18       PPIx::Regexp::Token::Interpolation.
19

DESCRIPTION

21       This class represents a chunk of Perl code embedded in a regular
22       expression. Specifically, it results from parsing things like
23
24        (?{ code })
25        (??{ code })
26
27       or from the replacement side of an s///e. Technically, interpolations
28       are also code, but they parse differently and therefore end up in a
29       different token.
30
31       This token may not appear inside a regex set (i.e. "(?[ ... ])". If
32       found, it will become a "PPIx::Regexp::Token::Unknown".
33

METHODS

35       This class provides the following public methods. Methods not
36       documented here are private, and unsupported in the sense that the
37       author reserves the right to change or remove them without notice.
38
39   is_matcher
40       This method returns "undef" because a static analysis can not in
41       general tell whether an interpolated value matches anything.
42
43   ppi
44       This convenience method returns the PPI::Document representing the
45       content. This document should be considered read only.
46
47       Note that if the location of the invocant is available the PPI document
48       will have stuff prefixed to it to make the location of the tokens in
49       the new document consistent with the location. This "stuff" will
50       include at least a "#line" directive, and maybe leading white space.
51

SUPPORT

53       Support is by the author. Please file bug reports at
54       <https://rt.cpan.org>, or in electronic mail to the author.
55

AUTHOR

57       Thomas R. Wyant, III wyant at cpan dot org
58
60       Copyright (C) 2009-2020 by Thomas R. Wyant, III
61
62       This program is free software; you can redistribute it and/or modify it
63       under the same terms as Perl 5.10.0. For more details, see the full
64       text of the licenses in the directory LICENSES.
65
66       This program is distributed in the hope that it will be useful, but
67       without any warranty; without even the implied warranty of
68       merchantability or fitness for a particular purpose.
69
70
71
72perl v5.32.0                      2020-07-29      PPIx::Regexp::Token::Code(3)
Impressum