1PPIx::Regexp::Token::MoUdsiefrieCro(n3t)ributed Perl DocPuPmIexn:t:aRteigoenxp::Token::Modifier(3)
2
3
4

NAME

6       PPIx::Regexp::Token::Modifier - Represent modifiers.
7

SYNOPSIS

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

INHERITANCE

14       "PPIx::Regexp::Token::Modifier" is a PPIx::Regexp::Token.
15
16       "PPIx::Regexp::Token::Modifier" is the parent of
17       PPIx::Regexp::Token::GroupType::Modifier.
18

DESCRIPTION

20       This class represents modifier characters at the end of the regular
21       expression.  For example, in "qr{foo}smx" this class would represent
22       the terminal "smx".
23

METHODS

25       This class provides the following public methods. Methods not
26       documented here are private, and unsupported in the sense that the
27       author reserves the right to change or remove them without notice.
28
29   asserts
30        $token->asserts( 'i' ) and print "token asserts i";
31        foreach ( $token->asserts() ) { print "token asserts $_\n" }
32
33       This method returns true if the token explicitly asserts the given
34       modifier. The example would return true for the modifier in "(?i:foo)",
35       but false for "(?-i:foo)".
36
37       If called without an argument, or with an undef argument, all modifiers
38       explicitly asserted by this token are returned.
39
40   modifiers
41        my %mods = $token->modifiers();
42
43       Returns all modifiers asserted or negated by this token, and the values
44       set (true for asserted, false for negated). If called in scalar
45       context, returns a reference to a hash containing the values.
46
47   negates
48        $token->negates( 'i' ) and print "token negates i\n";
49        foreach ( $token->negates() ) { print "token negates $_\n" }
50
51       This method returns true if the token explicitly negates the given
52       modifier. The example would return true for the modifier in
53       "(?-i:foo)", but false for "(?i:foo)".
54
55       If called without an argument, or with an undef argument, all modifiers
56       explicitly negated by this token are returned.
57

SUPPORT

59       Support is by the author. Please file bug reports at
60       <http://rt.cpan.org>, or in electronic mail to the author.
61

AUTHOR

63       Thomas R. Wyant, III wyant at cpan dot org
64
66       Copyright (C) 2009-2010, Thomas R. Wyant, III
67
68       This program is free software; you can redistribute it and/or modify it
69       under the same terms as Perl 5.10.0. For more details, see the full
70       text of the licenses in the directory LICENSES.
71
72       This program is distributed in the hope that it will be useful, but
73       without any warranty; without even the implied warranty of
74       merchantability or fitness for a particular purpose.
75
76
77
78perl v5.12.0                      2010-06-08  PPIx::Regexp::Token::Modifier(3)
Impressum