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
|
|
99
|
use strict; |
|
9
|
|
|
|
|
22
|
|
|
9
|
|
|
|
|
273
|
|
40
|
9
|
|
|
9
|
|
44
|
use warnings; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
244
|
|
41
|
|
|
|
|
|
|
|
42
|
9
|
|
|
9
|
|
45
|
use base qw{ PPIx::Regexp::Token::GroupType }; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
717
|
|
43
|
|
|
|
|
|
|
|
44
|
9
|
|
|
9
|
|
61
|
use PPIx::Regexp::Constant qw{ @CARP_NOT }; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
1507
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
our $VERSION = '0.087'; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub __match_setup { |
49
|
14
|
|
|
14
|
|
50
|
my ( undef, $tokenizer ) = @_; # Invocant unused |
50
|
14
|
|
|
|
|
67
|
$tokenizer->expect( qw{ PPIx::Regexp::Token::Code } ); |
51
|
14
|
|
|
|
|
44
|
return; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
9
|
|
|
|
|
728
|
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
|
|
|
|
|
|
|
'**' => { |
69
|
|
|
|
|
|
|
expl => 'Evaluate code, use as regexp at this point. Optimized.', |
70
|
|
|
|
|
|
|
intro => '5.037008', |
71
|
|
|
|
|
|
|
}, |
72
|
|
|
|
|
|
|
'*' => { |
73
|
|
|
|
|
|
|
expl => 'Evaluate code. Always matches. Optimized.', |
74
|
|
|
|
|
|
|
intro => '5.037008', |
75
|
|
|
|
|
|
|
}, |
76
|
9
|
|
|
9
|
|
64
|
}; |
|
9
|
|
|
|
|
17
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
__PACKAGE__->__setup_class( |
79
|
|
|
|
|
|
|
{ |
80
|
|
|
|
|
|
|
suffix => '{', |
81
|
|
|
|
|
|
|
}, |
82
|
|
|
|
|
|
|
); |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |