1PPIx::Regexp::Token::OpUesreartoCro(n3t)ributed Perl DocPuPmIexn:t:aRteigoenxp::Token::Operator(3)
2
3
4
6 PPIx::Regexp::Token::Operator - Represent an operator.
7
9 use PPIx::Regexp::Dumper;
10 PPIx::Regexp::Dumper->new( 'qr{foo|bar}smx' )
11 ->print();
12
14 "PPIx::Regexp::Token::Operator" is a PPIx::Regexp::Token.
15
16 "PPIx::Regexp::Token::Operator" has no descendants.
17
19 This class represents an operator. In a character class, it represents
20 the negation ("^") and range ("-") operators. Outside a character
21 class, it represents the alternation ("|") operator.
22
24 This class provides no public methods beyond those provided by its
25 superclass.
26
27 operation
28 This method returns the name of the operation performed by the
29 operator. This depends not only on the operator itself but its
30 context:
31
32 In a bracketed character class
33 '-' => 'range',
34 '^' => 'inversion',
35
36 In an extended bracketed character class
37 '&' => 'intersection',
38 '+' => 'union',
39 '|' => 'union',
40 '-' => 'subtraction',
41 '^' => 'symmetric_difference',
42 '!' => 'complement',
43
44 Outside any sort of bracketed character class
45 '|' => 'alternation',
46
48 Support is by the author. Please file bug reports at
49 <https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp>,
50 <https://github.com/trwyant/perl-PPIx-Regexp/issues>, or in electronic
51 mail to the author.
52
54 Thomas R. Wyant, III wyant at cpan dot org
55
57 Copyright (C) 2009-2021 by Thomas R. Wyant, III
58
59 This program is free software; you can redistribute it and/or modify it
60 under the same terms as Perl 5.10.0. For more details, see the full
61 text of the licenses in the directory LICENSES.
62
63 This program is distributed in the hope that it will be useful, but
64 without any warranty; without even the implied warranty of
65 merchantability or fitness for a particular purpose.
66
67
68
69perl v5.32.1 2021-03-26 PPIx::Regexp::Token::Operator(3)