1PPIx::Regexp::Token::LiUtseerralC(o3n)tributed Perl DocuPmPeInxt:a:tRieognexp::Token::Literal(3)
2
3
4
6 PPIx::Regexp::Token::Literal - Represent a literal character
7
9 use PPIx::Regexp::Dumper;
10 PPIx::Regexp::Dumper->new( 'qr{foo}smx' )
11 ->print();
12
14 "PPIx::Regexp::Token::Literal" is a PPIx::Regexp::Token.
15
16 "PPIx::Regexp::Token::Literal" has no descendants.
17
19 This class represents a literal character, no matter how specified.
20
22 This class provides the following public methods. Methods not
23 documented here are private, and unsupported in the sense that the
24 author reserves the right to change or remove them without notice.
25
26 is_matcher
27 This method returns a true value because a literal matches itself.
28
29 ordinal
30 print 'The ordinal of ', $token->content(),
31 ' is ', $token->ordinal(), "\n";
32
33 This method returns the ordinal of the literal if it can figure it out.
34 It is analogous to the "ord" built-in.
35
36 It will not attempt to determine the ordinal of a unicode name
37 ("\N{...}") unless charnames has been loaded, and supports the
38 vianame() function. Instead, it will return "undef". Users of Perl
39 5.6.2 and older may be out of luck here.
40
41 Unicode code points (e.g. "\N{U+abcd}") should work independently of
42 charnames, and just return the value of "abcd".
43
44 It will never attempt to return the ordinal of an octet ("\C{...}")
45 because I don't understand the syntax.
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-2022 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.34.1 2022-03-22 PPIx::Regexp::Token::Literal(3)