line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PPI::Token::Regexp::Match; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
PPI::Token::Regexp::Match - A standard pattern match regex |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 INHERITANCE |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
PPI::Token::Regexp::Match |
12
|
|
|
|
|
|
|
isa PPI::Token::Regexp |
13
|
|
|
|
|
|
|
isa PPI::Token |
14
|
|
|
|
|
|
|
isa PPI::Element |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 SYNOPSIS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$text =~ m/match regexp/; |
19
|
|
|
|
|
|
|
$text =~ /match regexp/; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
A C object represents a single match regular |
24
|
|
|
|
|
|
|
expression. Just to be doubly clear, here are things that are and |
25
|
|
|
|
|
|
|
B considered a match regexp. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# Is a match regexp |
28
|
|
|
|
|
|
|
/This is a match regexp/; |
29
|
|
|
|
|
|
|
m/Old McDonald had a farm/eieio; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# These are NOT match regexp |
32
|
|
|
|
|
|
|
qr/This is a regexp quote-like operator/; |
33
|
|
|
|
|
|
|
s/This is a/replace regexp/; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 METHODS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
There are no methods available for C beyond |
38
|
|
|
|
|
|
|
those provided by the parent L, L and |
39
|
|
|
|
|
|
|
L classes. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
65
|
|
|
65
|
|
393
|
use strict; |
|
65
|
|
|
|
|
152
|
|
|
65
|
|
|
|
|
1434
|
|
44
|
65
|
|
|
65
|
|
21503
|
use PPI::Token::Regexp (); |
|
65
|
|
|
|
|
138
|
|
|
65
|
|
|
|
|
1057
|
|
45
|
65
|
|
|
65
|
|
374
|
use PPI::Token::_QuoteEngine::Full (); |
|
65
|
|
|
|
|
116
|
|
|
65
|
|
|
|
|
2892
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
our $VERSION = '1.276'; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
our @ISA = qw{ |
50
|
|
|
|
|
|
|
PPI::Token::_QuoteEngine::Full |
51
|
|
|
|
|
|
|
PPI::Token::Regexp |
52
|
|
|
|
|
|
|
}; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SUPPORT |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
See the L in the main module. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 AUTHOR |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 COPYRIGHT |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Copyright 2001 - 2011 Adam Kennedy. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This program is free software; you can redistribute |
71
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The full text of the license can be found in the |
74
|
|
|
|
|
|
|
LICENSE file included with this module. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |