1PPIx::Regexp::Token::ReUfseerrenCcoen(t3r)ibuted Perl DoPcPuImxe:n:tRaetgieoxnp::Token::Reference(3)
2
3
4

NAME

6       PPIx::Regexp::Token::Reference - Represent a reference to a capture
7

SYNOPSIS

9        use PPIx::Regexp::Dumper;
10        PPIx::Regexp::Dumper->new( 'qr{\1}smx' )
11            ->print();
12

INHERITANCE

14       "PPIx::Regexp::Token::Reference" is a PPIx::Regexp::Token.
15
16       "PPIx::Regexp::Token::Reference" is the parent of
17       PPIx::Regexp::Token::Backreference, PPIx::Regexp::Token::Condition and
18       PPIx::Regexp::Token::Recursion.
19

DESCRIPTION

21       This abstract class represents a reference to a capture buffer, either
22       numbered or named. It should never be instantiated, but it provides a
23       number of methods to its subclasses.
24

METHODS

26       This class provides the following public methods. Methods not
27       documented here are private, and unsupported in the sense that the
28       author reserves the right to change or remove them without notice.
29
30   absolute
31        print "The absolute reference is ", $ref->absolute(), "\n";
32
33       This method returns the absolute number of the capture buffer referred
34       to. This is the same as number() for unsigned numeric references. If
35       the reference is to a named buffer, "undef" is returned.
36
37   is_named
38        $ref->is_named and print "named reference\n";
39
40       This method returns true if the reference is named rather than
41       numbered.
42
43   is_relative
44        $ref->is_relative()
45            and print "relative numbered reference\n";
46
47       This method returns true if the reference is numbered and it is a
48       relative number (i.e. if it is signed).
49
50   is_matcher
51       This method returns a true value because, although we do not actually
52       perform an analysis on the referred-to entity, we presume it matches
53       something.
54
55   name
56        print "The name is ", $ref->name(), "\n";
57
58       This method returns the name of the capture buffer referred to. In the
59       case of a reference to a numbered capture (i.e. "is_named" returns
60       false), this method returns "undef".
61
62   number
63        print "The number is ", $ref->number(), "\n";
64
65       This method returns the number of the capture buffer referred to. In
66       the case of a reference to a named capture (i.e. "is_named" returns
67       true), this method returns "undef".
68

SUPPORT

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

AUTHOR

74       Thomas R. Wyant, III wyant at cpan dot org
75
77       Copyright (C) 2009-2020 by Thomas R. Wyant, III
78
79       This program is free software; you can redistribute it and/or modify it
80       under the same terms as Perl 5.10.0. For more details, see the full
81       text of the licenses in the directory LICENSES.
82
83       This program is distributed in the hope that it will be useful, but
84       without any warranty; without even the implied warranty of
85       merchantability or fitness for a particular purpose.
86
87
88
89perl v5.32.0                      2020-07-29 PPIx::Regexp::Token::Reference(3)
Impressum