line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
PPIx::Regexp::Token::GroupType::Code - Represent one of the embedded code indicators |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSIS |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use PPIx::Regexp::Dumper; |
8
|
|
|
|
|
|
|
PPIx::Regexp::Dumper->new( 'qr{(?{print "hello world!\n")}smx' ) |
9
|
|
|
|
|
|
|
->print(); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 INHERITANCE |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
C is a |
14
|
|
|
|
|
|
|
L. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
C has no descendants. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This method represents one of the embedded code indicators, either '?' |
21
|
|
|
|
|
|
|
or '??', in the zero-width assertion |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
(?{ print "Hello, world!\n" }) |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
or the old-style deferred expression syntax |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $foo; |
28
|
|
|
|
|
|
|
$foo = qr{ foo (??{ $foo }) }smx; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 METHODS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
This class provides no public methods beyond those provided by its |
33
|
|
|
|
|
|
|
superclass. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
package PPIx::Regexp::Token::GroupType::Code; |
38
|
|
|
|
|
|
|
|
39
|
9
|
|
|
9
|
|
61
|
use strict; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
248
|
|
40
|
9
|
|
|
9
|
|
51
|
use warnings; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
231
|
|
41
|
|
|
|
|
|
|
|
42
|
9
|
|
|
9
|
|
44
|
use base qw{ PPIx::Regexp::Token::GroupType }; |
|
9
|
|
|
|
|
25
|
|
|
9
|
|
|
|
|
692
|
|
43
|
|
|
|
|
|
|
|
44
|
9
|
|
|
9
|
|
60
|
use PPIx::Regexp::Constant qw{ @CARP_NOT }; |
|
9
|
|
|
|
|
22
|
|
|
9
|
|
|
|
|
1344
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
our $VERSION = '0.088'; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub __match_setup { |
49
|
14
|
|
|
14
|
|
49
|
my ( undef, $tokenizer ) = @_; # Invocant unused |
50
|
14
|
|
|
|
|
56
|
$tokenizer->expect( qw{ PPIx::Regexp::Token::Code } ); |
51
|
14
|
|
|
|
|
34
|
return; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
9
|
|
|
|
|
733
|
use constant DEF => { |
55
|
|
|
|
|
|
|
'??' => { |
56
|
|
|
|
|
|
|
expl => 'Evaluate code, use as regexp at this point', |
57
|
|
|
|
|
|
|
intro => '5.006', |
58
|
|
|
|
|
|
|
}, |
59
|
|
|
|
|
|
|
'?p' => { |
60
|
|
|
|
|
|
|
expl => 'Evaluate code, use as regexp at this point (removed in 5.9.5)', |
61
|
|
|
|
|
|
|
intro => '5.005', # Presumed. I can find no documentation. |
62
|
|
|
|
|
|
|
remov => '5.009005', |
63
|
|
|
|
|
|
|
}, |
64
|
|
|
|
|
|
|
'?' => { |
65
|
|
|
|
|
|
|
expl => 'Evaluate code. Always matches.', |
66
|
|
|
|
|
|
|
intro => '5.005', |
67
|
|
|
|
|
|
|
}, |
68
|
|
|
|
|
|
|
# Removed in 5.37.9. |
69
|
|
|
|
|
|
|
# '**' => { |
70
|
|
|
|
|
|
|
# expl => 'Evaluate code, use as regexp at this point. Optimized.', |
71
|
|
|
|
|
|
|
# intro => '5.037008', |
72
|
|
|
|
|
|
|
# }, |
73
|
|
|
|
|
|
|
'*' => { |
74
|
|
|
|
|
|
|
expl => 'Evaluate code. Always matches. Optimized.', |
75
|
|
|
|
|
|
|
intro => '5.037008', |
76
|
|
|
|
|
|
|
}, |
77
|
9
|
|
|
9
|
|
60
|
}; |
|
9
|
|
|
|
|
18
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
__PACKAGE__->__setup_class( |
80
|
|
|
|
|
|
|
{ |
81
|
|
|
|
|
|
|
suffix => '{', |
82
|
|
|
|
|
|
|
}, |
83
|
|
|
|
|
|
|
); |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
__END__ |