line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Syntax::Construct; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
341888
|
use 5.006002; |
|
7
|
|
|
|
|
64
|
|
4
|
7
|
|
|
7
|
|
36
|
use strict; |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
166
|
|
5
|
7
|
|
|
7
|
|
33
|
use warnings; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
368
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.032'; |
8
|
|
|
|
|
|
|
|
9
|
7
|
|
|
7
|
|
40
|
my %introduces = do { no warnings 'qw'; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
3572
|
|
10
|
|
|
|
|
|
|
( '5.036' => [qw[ |
11
|
|
|
|
|
|
|
unicode14.0 |
12
|
|
|
|
|
|
|
]], |
13
|
|
|
|
|
|
|
'5.034' => [qw[ |
14
|
|
|
|
|
|
|
{,n} 0o blanks-in-curlies |
15
|
|
|
|
|
|
|
]], |
16
|
|
|
|
|
|
|
'5.032' => [qw[ |
17
|
|
|
|
|
|
|
unicode13.0 chained-comparisons |
18
|
|
|
|
|
|
|
unicode-identifier-status |
19
|
|
|
|
|
|
|
unicode-name-property |
20
|
|
|
|
|
|
|
]], |
21
|
|
|
|
|
|
|
'5.030' => [qw[ |
22
|
|
|
|
|
|
|
unicode12.1 uniprop_wildcards qr'N |
23
|
|
|
|
|
|
|
turkic-casing ^RE_COMPILE_RECURSION_LIMIT |
24
|
|
|
|
|
|
|
]], |
25
|
|
|
|
|
|
|
'5.028' => [qw[ |
26
|
|
|
|
|
|
|
delete% unicode10.0 state@= |
27
|
|
|
|
|
|
|
]], |
28
|
|
|
|
|
|
|
'5.026' => [qw[ |
29
|
|
|
|
|
|
|
<<~ /xx ^CAPTURE unicode9.0 unicode-scx scalar% |
30
|
|
|
|
|
|
|
]], |
31
|
|
|
|
|
|
|
'5.024' => [qw[ |
32
|
|
|
|
|
|
|
unicode8.0 \b{lb} sprintf-reorder |
33
|
|
|
|
|
|
|
]], |
34
|
|
|
|
|
|
|
'5.022' => [qw[ |
35
|
|
|
|
|
|
|
<<>> \b{} /n unicode7.0 attr-const |
36
|
|
|
|
|
|
|
fileno-dir ()x= hexfloat chr-inf |
37
|
|
|
|
|
|
|
empty-slice /x-unicode |
38
|
|
|
|
|
|
|
]], |
39
|
|
|
|
|
|
|
'5.020' => [qw[ |
40
|
|
|
|
|
|
|
attr-prototype drand48 %slice |
41
|
|
|
|
|
|
|
unicode6.3 \p{Unicode} utf8-locale |
42
|
|
|
|
|
|
|
s-utf8-delimiters |
43
|
|
|
|
|
|
|
]], |
44
|
|
|
|
|
|
|
'5.018' => [qw[ |
45
|
|
|
|
|
|
|
computed-labels while-each method-on-any-string |
46
|
|
|
|
|
|
|
]], |
47
|
|
|
|
|
|
|
'5.016' => [qw[ |
48
|
|
|
|
|
|
|
charnames |
49
|
|
|
|
|
|
|
]], |
50
|
|
|
|
|
|
|
'5.014' => [qw[ |
51
|
|
|
|
|
|
|
?^ /r /d /l /u /a auto-deref |
52
|
|
|
|
|
|
|
^GLOBAL_PHASE \o package-block |
53
|
|
|
|
|
|
|
srand-return prototype+ |
54
|
|
|
|
|
|
|
]], |
55
|
|
|
|
|
|
|
'5.012' => [qw[ |
56
|
|
|
|
|
|
|
package-version ... each-array |
57
|
|
|
|
|
|
|
keys-array values-array delete-local |
58
|
|
|
|
|
|
|
length-undef \N while-readdir |
59
|
|
|
|
|
|
|
]], |
60
|
|
|
|
|
|
|
'5.010' => [qw[ |
61
|
|
|
|
|
|
|
// ?PARNO ?<> ?| quant+ regex-verbs |
62
|
|
|
|
|
|
|
\K \R \v \h \gN readline() |
63
|
|
|
|
|
|
|
stack-file-test recursive-sort /p |
64
|
|
|
|
|
|
|
lexical-$_ pack< |
65
|
|
|
|
|
|
|
]], |
66
|
|
|
|
|
|
|
'5.008001' => [qw[ |
67
|
|
|
|
|
|
|
s-utf8-delimiters-hack |
68
|
|
|
|
|
|
|
]], |
69
|
|
|
|
|
|
|
old => [qw[ |
70
|
|
|
|
|
|
|
?? for-qw @_=split no-sigil |
71
|
|
|
|
|
|
|
]], |
72
|
|
|
|
|
|
|
)}; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my %removed = ( 'auto-deref' => '5.024', |
75
|
|
|
|
|
|
|
'lexical-$_' => '5.024', |
76
|
|
|
|
|
|
|
'??' => '5.022', |
77
|
|
|
|
|
|
|
'no-sigil' => '5.022', |
78
|
|
|
|
|
|
|
's-utf8-delimiters-hack' => '5.020', |
79
|
|
|
|
|
|
|
'for-qw' => '5.018', |
80
|
|
|
|
|
|
|
'@_=split' => '5.012', |
81
|
|
|
|
|
|
|
); |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my %alias = ( |
84
|
|
|
|
|
|
|
# old |
85
|
|
|
|
|
|
|
'split-populates-@_' => '@_=split', |
86
|
|
|
|
|
|
|
# 5.010 |
87
|
|
|
|
|
|
|
'\H' => '\h', |
88
|
|
|
|
|
|
|
'\V' => '\v', |
89
|
|
|
|
|
|
|
'defined-or' => '//', |
90
|
|
|
|
|
|
|
'lexical-default-variable' => 'lexical-$_', |
91
|
|
|
|
|
|
|
'pack-byte-order-modifiers' => 'pack<', |
92
|
|
|
|
|
|
|
'readline-argv' => 'readline()', |
93
|
|
|
|
|
|
|
'regex-generic-linebreak' => '\R', |
94
|
|
|
|
|
|
|
'regex-horizontal-whitespace' => '\h', |
95
|
|
|
|
|
|
|
'regex-keep-left' => '\K', |
96
|
|
|
|
|
|
|
'regex-named-capture-group' => '?<>', |
97
|
|
|
|
|
|
|
'regex-possessive-quantifier' => 'quant+', |
98
|
|
|
|
|
|
|
'regex-possessive-match' => 'quant+', |
99
|
|
|
|
|
|
|
'regex-preserve-match-captures' => '/p', |
100
|
|
|
|
|
|
|
'regex-recursive-subpattern' => '?PARNO', |
101
|
|
|
|
|
|
|
'regex-relative-backreference' => '\gN', |
102
|
|
|
|
|
|
|
'regex-reset-branch' => '?|', |
103
|
|
|
|
|
|
|
'regex-vertical-whitespace' => '\v', |
104
|
|
|
|
|
|
|
# 5.012 |
105
|
|
|
|
|
|
|
'statement-ellipsis' => '...', |
106
|
|
|
|
|
|
|
'yada-yada' => '...', |
107
|
|
|
|
|
|
|
'triple-dot' => '...', |
108
|
|
|
|
|
|
|
'regex-non-newline' => '\N', |
109
|
|
|
|
|
|
|
# 5.014 |
110
|
|
|
|
|
|
|
'non-destructive-subst' => '/r', |
111
|
|
|
|
|
|
|
'non-destructive-substitution' => '/r', |
112
|
|
|
|
|
|
|
'regex-restrict-ascii-range' => '/a', |
113
|
|
|
|
|
|
|
'regex-unicode-strings' => '/u', |
114
|
|
|
|
|
|
|
'regex-use-default-modifiers' => '?^', |
115
|
|
|
|
|
|
|
'regex-compile-as-default' => '/d', |
116
|
|
|
|
|
|
|
'regex-compile-as-locale' => '/l', |
117
|
|
|
|
|
|
|
'regex-compile-as-unicode-strings' => '/u', |
118
|
|
|
|
|
|
|
'global-phase' => '^GLOBAL_PHASE', |
119
|
|
|
|
|
|
|
'octal-escape' => '\o', |
120
|
|
|
|
|
|
|
# 5.020 |
121
|
|
|
|
|
|
|
'hash-slice' => '%slice', |
122
|
|
|
|
|
|
|
'attribute-prototype' => 'attr-prototype', |
123
|
|
|
|
|
|
|
'regex-property-unicode' => '\p{Unicode}', |
124
|
|
|
|
|
|
|
'wide-char-delimiters' => 's-utf8-delimiters', |
125
|
|
|
|
|
|
|
'unicode-6.3' => 'unicode6.3', |
126
|
|
|
|
|
|
|
# 5.022 |
127
|
|
|
|
|
|
|
'double-diamond' => '<<>>', |
128
|
|
|
|
|
|
|
'operator-double-diamond' => '<<>>', |
129
|
|
|
|
|
|
|
'regex-non-capturing' => '/n', |
130
|
|
|
|
|
|
|
'\b{gcb}' => '\b{}', |
131
|
|
|
|
|
|
|
'\b{wb}' => '\b{}', |
132
|
|
|
|
|
|
|
'\b{sb}' => '\b{}', |
133
|
|
|
|
|
|
|
'regex-unicode-boundary' => '\b{}', |
134
|
|
|
|
|
|
|
'regex-unicode-grapheme-cluster-boundary' => '\b{}', |
135
|
|
|
|
|
|
|
'regex-unicode-word-boundary' => '\b{}', |
136
|
|
|
|
|
|
|
'regex-unicode-sentence-boundary' => '\b{}', |
137
|
|
|
|
|
|
|
'attribute-const' => 'attr-const', |
138
|
|
|
|
|
|
|
'list-repetition-assignment' => '()x=', |
139
|
|
|
|
|
|
|
'hexadecimal-floating-numbers' => 'hexfloat', |
140
|
|
|
|
|
|
|
'pack-inf' => 'chr-inf', |
141
|
|
|
|
|
|
|
'regex-x-unicode' => '/x-unicode', |
142
|
|
|
|
|
|
|
'regex-x-handles-unicode' => '/x-unicode', |
143
|
|
|
|
|
|
|
'unicode-7.0' => 'unicode7.0', |
144
|
|
|
|
|
|
|
# 5.024 |
145
|
|
|
|
|
|
|
'unicode-8.0' => 'unicode8.0', |
146
|
|
|
|
|
|
|
'regex-unicode-line-break-boundary' => '\b{lb}', |
147
|
|
|
|
|
|
|
'printf-precision-argument-reorder' => 'sprintf-reorder', |
148
|
|
|
|
|
|
|
'sprintf-precision-argument-reorder' => 'sprintf-reorder', |
149
|
|
|
|
|
|
|
# 5.026 |
150
|
|
|
|
|
|
|
'unicode-9.0' => 'unicode9.0', |
151
|
|
|
|
|
|
|
'heredoc-indent' => '<<~', |
152
|
|
|
|
|
|
|
'regex-xx' => '/xx', |
153
|
|
|
|
|
|
|
'capture-variable' => '^CAPTURE', |
154
|
|
|
|
|
|
|
'scalar-hash' => 'scalar%', |
155
|
|
|
|
|
|
|
# 5.028 |
156
|
|
|
|
|
|
|
'hash-delete-slice' => 'delete%', |
157
|
|
|
|
|
|
|
'unicode-10.0' => 'unicode10.0', |
158
|
|
|
|
|
|
|
'state-array' => 'state@=', |
159
|
|
|
|
|
|
|
'state-hash' => 'state@=', |
160
|
|
|
|
|
|
|
'list-context-state' => 'state@=', |
161
|
|
|
|
|
|
|
# 5.030 |
162
|
|
|
|
|
|
|
'named-char-in-single-quoted-regex' => "qr'N", |
163
|
|
|
|
|
|
|
'unicode-12.1' => 'unicode12.1', |
164
|
|
|
|
|
|
|
're-compile-recursion-limit' => '^RE_COMPILE_RECURSION_LIMIT', |
165
|
|
|
|
|
|
|
# 5.032 |
166
|
|
|
|
|
|
|
'unicode-13.0' => 'unicode13.0', |
167
|
|
|
|
|
|
|
'unicode-identifier-type' => 'unicode-identifier-status', |
168
|
|
|
|
|
|
|
# 5.034 |
169
|
|
|
|
|
|
|
'empty-left-quantifier' => '{,n}', |
170
|
|
|
|
|
|
|
'octal-literals' => '0o', |
171
|
|
|
|
|
|
|
); |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
my %_introduced = map { |
174
|
|
|
|
|
|
|
my $version = $_; |
175
|
|
|
|
|
|
|
map { $_ => $version } @{ $introduces{$version} } |
176
|
|
|
|
|
|
|
} keys %introduces; |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
my %introduced = %_introduced; |
179
|
|
|
|
|
|
|
delete @introduced{ @{ $introduces{old} } }; |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
sub _hook { |
182
|
|
|
|
|
|
|
{ drand48 => sub { |
183
|
1
|
|
|
1
|
|
8
|
require Config; |
184
|
|
|
|
|
|
|
warn "Unknown rand implementation at ", _position(1), ".\n" |
185
|
1
|
50
|
|
|
|
107
|
unless 'Perl_drand48' eq $Config::Config{randfunc}; |
186
|
|
|
|
|
|
|
}, |
187
|
|
|
|
|
|
|
'turkic-casing' => sub { |
188
|
0
|
0
|
|
0
|
|
0
|
eval { |
189
|
7
|
|
|
7
|
|
3288
|
use locale; |
|
7
|
|
|
|
|
4206
|
|
|
7
|
|
|
|
|
39
|
|
190
|
0
|
|
|
|
|
0
|
require POSIX; |
191
|
0
|
|
|
|
|
0
|
POSIX::setlocale(POSIX::LC_ALL(), 'tr_TR.UTF-8'); |
192
|
0
|
|
|
|
|
0
|
lc 'I' ne 'i' |
193
|
|
|
|
|
|
|
} or die 'Turkic locale casing not working at ' |
194
|
|
|
|
|
|
|
. _position(1) . "\.\n"; |
195
|
|
|
|
|
|
|
}, |
196
|
|
|
|
|
|
|
} |
197
|
88
|
|
|
88
|
|
639
|
} |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
sub removed { |
201
|
87
|
|
|
87
|
1
|
226184
|
my $construct = shift; |
202
|
|
|
|
|
|
|
return $construct |
203
|
|
|
|
|
|
|
? $removed{$construct} |
204
|
87
|
100
|
66
|
|
|
587
|
|| $alias{$construct} && $removed{ $alias{$construct} } |
205
|
|
|
|
|
|
|
: keys %removed |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
sub introduced { |
210
|
5
|
|
|
5
|
1
|
185
|
my $construct = shift; |
211
|
|
|
|
|
|
|
return $construct |
212
|
|
|
|
|
|
|
? $introduced{$construct} |
213
|
5
|
100
|
66
|
|
|
61
|
|| $alias{$construct} && $introduced{ $alias{$construct} } |
214
|
|
|
|
|
|
|
: keys %introduced |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub _position { |
219
|
26
|
|
|
26
|
|
388
|
join ' line ', (caller(1 + !! shift))[1,2] |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
sub import { |
224
|
91
|
|
|
91
|
|
3209
|
shift; |
225
|
91
|
|
|
|
|
138
|
my $min_version = 0; |
226
|
91
|
|
|
|
|
126
|
my $max_version = 6; |
227
|
91
|
|
|
|
|
205
|
my ($constr, $d_constr); |
228
|
91
|
|
|
|
|
0
|
my @actions; |
229
|
91
|
|
|
|
|
182
|
for my $name (@_) { |
230
|
90
|
100
|
|
|
|
265
|
local $_ = exists $alias{$name} ? $alias{$name} : $name; |
231
|
90
|
100
|
|
|
|
296
|
if ($introduced{$_}) { |
|
|
100
|
|
|
|
|
|
232
|
|
|
|
|
|
|
($min_version, $constr) = ($introduced{$_}, $name) |
233
|
85
|
50
|
|
|
|
337
|
if $introduced{$_} gt $min_version; |
234
|
|
|
|
|
|
|
} elsif (! $removed{$_}) { |
235
|
1
|
|
|
|
|
6
|
die "Unknown construct `$name' at ", |
236
|
|
|
|
|
|
|
_position(), |
237
|
|
|
|
|
|
|
". Try upgrading Syntax::Construct first.\n" |
238
|
|
|
|
|
|
|
} |
239
|
|
|
|
|
|
|
|
240
|
89
|
100
|
|
|
|
222
|
if ($removed{$_}) { |
241
|
|
|
|
|
|
|
($max_version, $d_constr) = ($removed{$_}, $name) |
242
|
7
|
50
|
|
|
|
45
|
if $removed{$_} lt $max_version; |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
|
245
|
89
|
|
|
|
|
170
|
my $action = _hook()->{$_}; |
246
|
89
|
100
|
|
|
|
600
|
push @actions, $action if $action; |
247
|
|
|
|
|
|
|
} |
248
|
90
|
100
|
|
|
|
222
|
die 'Empty construct list at ', _position(), ".\n" unless @_; |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
my $nearest_stable = ( my $is_stable = $] =~ /^[0-5]\.[0-9][0-9][02468]/ ) |
251
|
|
|
|
|
|
|
? $] |
252
|
89
|
50
|
|
|
|
502
|
: do { |
253
|
0
|
|
|
|
|
0
|
my ($major, $minor) |
254
|
|
|
|
|
|
|
= $] =~ /^([0-5])\.([0-9][0-9][13579])/; |
255
|
0
|
|
|
|
|
0
|
++$minor; |
256
|
0
|
|
|
|
|
0
|
"$major.$minor" |
257
|
|
|
|
|
|
|
}; |
258
|
89
|
100
|
|
|
|
208
|
if ($max_version le $nearest_stable) { |
259
|
7
|
50
|
33
|
|
|
29
|
warn "Faking version $nearest_stable to test removed constructs.\n" |
260
|
|
|
|
|
|
|
if ! $is_stable && $max_version eq $nearest_stable; |
261
|
7
|
|
|
|
|
26
|
die "$d_constr removed in $max_version at ", _position(), ".\n"; |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
|
264
|
82
|
100
|
|
|
|
201
|
die "Unsupported construct $constr at ", _position(), |
265
|
|
|
|
|
|
|
sprintf " (Perl %s needed)\n", $min_version |
266
|
|
|
|
|
|
|
unless $min_version le $]; |
267
|
|
|
|
|
|
|
|
268
|
65
|
|
|
|
|
189
|
$_->() for @actions; |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
|
271
|
0
|
0
|
|
0
|
|
|
sub _is_old_empty { @{ $introduces{old} } ? 0 : 1 } |
|
0
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
=head1 NAME |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
Syntax::Construct - Explicitly state which non-feature constructs are used in the code. |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
=head1 VERSION |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
Version 1.032 |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
=head1 SYNOPSIS |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
For some new syntactic constructs, there is the L pragma. For |
284
|
|
|
|
|
|
|
the rest, there is B. |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
use Syntax::Construct qw( // ... /r ); |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
my $x = shift // 'default'; |
289
|
|
|
|
|
|
|
my $y = $x =~ s/de(fault)/$1/r; |
290
|
|
|
|
|
|
|
if ($y =~ /^fault/) { |
291
|
|
|
|
|
|
|
... |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
There are two subroutines (not exported) which you can use to query |
295
|
|
|
|
|
|
|
the lists of constructs programmatically: C and |
296
|
|
|
|
|
|
|
C (see below). |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
my @constructs = Syntax::Construct::introduced(); |
299
|
|
|
|
|
|
|
say "$_ was introduced in ", |
300
|
|
|
|
|
|
|
Syntax::Construct::introduced($_) for @constructs; |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
=head1 DESCRIPTION |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
This module provides a simple way of specifying syntactic constructs |
305
|
|
|
|
|
|
|
that are not implemented via the L pragma, but are still not |
306
|
|
|
|
|
|
|
compatible with older versions of Perl. |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
It's the programmer's responsibility to track the constructs and list |
309
|
|
|
|
|
|
|
them (but see L on how to extract the |
310
|
|
|
|
|
|
|
information from existing code). |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
Using C |
313
|
|
|
|
|
|
|
anything if you're running Perl 5.010+, but it gives much better error |
314
|
|
|
|
|
|
|
messages in older versions: |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
Unsupported construct // |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
instead of |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
Search pattern not terminated |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
Three groups of people can benefit from the module: |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
=over 4 |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
=item 1. |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
The authors of the module using L win, as they have |
329
|
|
|
|
|
|
|
all the constructs in one place (i.e. L's |
330
|
|
|
|
|
|
|
documentation) and they don't waste their time searching through |
331
|
|
|
|
|
|
|
perldeltas and other places. |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
=item 2. |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
Users of their modules win as they get meaningful error messages |
336
|
|
|
|
|
|
|
telling them which Perl version they need to upgrade to. |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
=item 3. |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
The programmer they hired to work around the problem wins as they know |
341
|
|
|
|
|
|
|
what constructs to replace in the code to make it run in the ancient |
342
|
|
|
|
|
|
|
version. |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
=back |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=head2 Good Practice |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
Some programmers just use all the I their current Perl |
349
|
|
|
|
|
|
|
version provides without any notice. This leads to weird error |
350
|
|
|
|
|
|
|
messages in older Perl versions. |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
Some other programmers will place C |
353
|
|
|
|
|
|
|
script, even if the only I they use is the C/> operator |
354
|
|
|
|
|
|
|
available in 5.010 already. This prevents users of older versions of |
355
|
|
|
|
|
|
|
Perl to run the script, even if it would otherwise be easily possible. |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
The kindest programmers will add C towards the top of |
358
|
|
|
|
|
|
|
the script. But it means they have to remember or find out what |
359
|
|
|
|
|
|
|
version introduced the I they use. |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
B liberates you from the need to remember all the |
362
|
|
|
|
|
|
|
I together with Perl versions that introduced them. It |
363
|
|
|
|
|
|
|
makes it easier for users of older Perl versions to migrate your code |
364
|
|
|
|
|
|
|
to their system. And finally, it improves the error messages they get. |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
Similarly, it's a good practice to keep specifying C |
367
|
|
|
|
|
|
|
postderef };> even if it's a no-op since 5.024: it makes your script |
368
|
|
|
|
|
|
|
available for people running older Perl versions. The same applies to |
369
|
|
|
|
|
|
|
C |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
=head1 EXPORT |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
Nothing. Using B with no parameters is an error, |
374
|
|
|
|
|
|
|
giving it an empty list is a no-op (but you can then access the |
375
|
|
|
|
|
|
|
C and C subroutines). |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
=over 4 |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
=item introduced |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
Without arguments, returns a list of all the supported |
382
|
|
|
|
|
|
|
constructs. With an argument, returns the version in which the given |
383
|
|
|
|
|
|
|
construct was introduced. |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
=item removed |
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
Same as C, but for removed constructs (e.g. auto-deref in |
388
|
|
|
|
|
|
|
5.024). |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=back |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
=head1 RECOGNISED CONSTRUCTS |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=head2 5.008001 |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
=head3 s-utf8-delimiters-hack |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
See L. The hack doesn't seem to work in 5.008 |
399
|
|
|
|
|
|
|
and older. Removed in 5.020. |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
=head2 5.010 |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
=head3 recursive-sort |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
L. |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=head3 // |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
L or L. |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
Alias: defined-or |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
=head3 ?PARNO |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
"Recursive Patterns" under L or |
416
|
|
|
|
|
|
|
L. |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
Alias: regex-recursive-subpattern |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
=head3 ?<> |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
"Named Capture Buffers" under L or |
423
|
|
|
|
|
|
|
LNAMEE<62>pattern)">. |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
Alias: regex-named-capture-group |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
=head3 ?| |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
Not mentioned in any Delta. See B<(?|pattern)> in L. |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
Alias: regex-reset-branch |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
=head3 quant+ |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
"Possessive Quantifiers" under L or |
436
|
|
|
|
|
|
|
L. |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
Aliases: regex-possessive-quantifier regex-possessive-match |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
=head3 regex-verbs |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
"Backtracking control verbs" under L
|
443
|
|
|
|
|
|
|
expressions> or L. |
444
|
|
|
|
|
|
|
|
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
=head3 \K |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
"\K escape" under L or |
449
|
|
|
|
|
|
|
L. |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
Alias: regex-keep-left |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
=head3 \R \v \h |
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
Covers C<\V> and C<\H>, too. See "Vertical and horizontal whitespace, |
456
|
|
|
|
|
|
|
and linebreak" under L or |
457
|
|
|
|
|
|
|
L. |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
Aliases: \H \V regex-generic-linebreak regex-horizontal-whitespace regex-vertical-whitespace |
460
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
=head3 \gN |
462
|
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
"Relative backreferences" under L or |
464
|
|
|
|
|
|
|
L. |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
Alias: regex-relative-backreference |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
=head3 readline() |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
L. |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
Alias: readline-argv |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
=head3 stack-file-test |
475
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
L. |
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
=head3 /p |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
C (preserve) modifier and C<${^PREMATCH}>, C<${^MATCH}> and |
481
|
|
|
|
|
|
|
C<${^POSTMATCH}> variables. Not mentioned in any Delta. See |
482
|
|
|
|
|
|
|
L. |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
Alias: regex-preserve-match-captures |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
=head3 lexical-$_ |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
L. Removed in 5.024. |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
Alias: lexical-default-variable |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
=head3 pack< |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
See L |
495
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
Alias: pack-byte-order-modifiers |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
=head2 5.012 |
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
=head3 package-version |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
L |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
=head3 ... |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
L or L |
507
|
|
|
|
|
|
|
|
508
|
|
|
|
|
|
|
Aliases: yada-yada triple-dot statement-ellipsis |
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
=head3 each-array |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
L |
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
=head3 keys-array |
515
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
L |
517
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
=head3 values-array |
519
|
|
|
|
|
|
|
|
520
|
|
|
|
|
|
|
L |
521
|
|
|
|
|
|
|
|
522
|
|
|
|
|
|
|
=head3 delete-local |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
L |
525
|
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
=head3 length-undef |
527
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
See the ninth bullet in L
|
529
|
|
|
|
|
|
|
changes>. |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
=head3 \N |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
L. |
534
|
|
|
|
|
|
|
|
535
|
|
|
|
|
|
|
Alias: regex-non-newline |
536
|
|
|
|
|
|
|
|
537
|
|
|
|
|
|
|
=head3 while-readdir |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
C in a while-loop condition populates C<$_>. Not mentioned in |
540
|
|
|
|
|
|
|
any delta, but see C in L. |
541
|
|
|
|
|
|
|
|
542
|
|
|
|
|
|
|
=head2 5.014 |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
=head3 ?^ |
545
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
L. |
547
|
|
|
|
|
|
|
|
548
|
|
|
|
|
|
|
Alias: regex-use-default-modifiers |
549
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
=head3 /r |
551
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
L and L. |
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
Aliases: non-destructive-subst non-destructive-substitution |
555
|
|
|
|
|
|
|
|
556
|
|
|
|
|
|
|
=head3 /d |
557
|
|
|
|
|
|
|
|
558
|
|
|
|
|
|
|
L and L. |
559
|
|
|
|
|
|
|
|
560
|
|
|
|
|
|
|
Alias: regex-compile-as-default |
561
|
|
|
|
|
|
|
|
562
|
|
|
|
|
|
|
=head3 /l |
563
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
L and L. |
565
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
Alias: regex-compile-as-locale |
567
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
=head3 /u |
569
|
|
|
|
|
|
|
|
570
|
|
|
|
|
|
|
L and L. |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
Aliases: regex-unicode-strings regex-compile-as-unicode-strings |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
=head3 /a |
575
|
|
|
|
|
|
|
|
576
|
|
|
|
|
|
|
L and L. |
577
|
|
|
|
|
|
|
|
578
|
|
|
|
|
|
|
Alias: regex-restrict-ascii-range |
579
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
=head3 auto-deref |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
L
|
583
|
|
|
|
|
|
|
references>. See also C, C, C, C, |
584
|
|
|
|
|
|
|
C, C, C, and C in L. |
585
|
|
|
|
|
|
|
Removed in 5.024. |
586
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
=head3 ^GLOBAL_PHASE |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
See B under |
590
|
|
|
|
|
|
|
L. |
591
|
|
|
|
|
|
|
|
592
|
|
|
|
|
|
|
Alias: global-phase |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
=head3 \o |
595
|
|
|
|
|
|
|
|
596
|
|
|
|
|
|
|
L. |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
Alias: octal-escape |
599
|
|
|
|
|
|
|
|
600
|
|
|
|
|
|
|
=head3 package-block |
601
|
|
|
|
|
|
|
|
602
|
|
|
|
|
|
|
See B under L. |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
=head3 srand-return |
605
|
|
|
|
|
|
|
|
606
|
|
|
|
|
|
|
See B under L. |
607
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
=head3 prototype+ |
609
|
|
|
|
|
|
|
|
610
|
|
|
|
|
|
|
See L. |
611
|
|
|
|
|
|
|
|
612
|
|
|
|
|
|
|
=head2 5.016 |
613
|
|
|
|
|
|
|
|
614
|
|
|
|
|
|
|
=head3 charnames |
615
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
See L. |
617
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
=head2 5.018 |
619
|
|
|
|
|
|
|
|
620
|
|
|
|
|
|
|
=head3 computed-labels |
621
|
|
|
|
|
|
|
|
622
|
|
|
|
|
|
|
L |
623
|
|
|
|
|
|
|
|
624
|
|
|
|
|
|
|
=head3 while-each |
625
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
See in L or C in L. |
627
|
|
|
|
|
|
|
|
628
|
|
|
|
|
|
|
=head3 method-on-any-string |
629
|
|
|
|
|
|
|
|
630
|
|
|
|
|
|
|
See [perl #105922] in L. |
631
|
|
|
|
|
|
|
|
632
|
|
|
|
|
|
|
=head2 5.020 |
633
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
=head3 attr-prototype |
635
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
L |
637
|
|
|
|
|
|
|
|
638
|
|
|
|
|
|
|
Alias: attribute-prototype |
639
|
|
|
|
|
|
|
|
640
|
|
|
|
|
|
|
=head3 drand48 |
641
|
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
L. |
643
|
|
|
|
|
|
|
Note that on OpenBSD, Perl 5.020+ uses the system's own C |
644
|
|
|
|
|
|
|
unless seeded. |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
=head3 %slice |
647
|
|
|
|
|
|
|
|
648
|
|
|
|
|
|
|
L |
649
|
|
|
|
|
|
|
|
650
|
|
|
|
|
|
|
Alias: hash-slice |
651
|
|
|
|
|
|
|
|
652
|
|
|
|
|
|
|
=head3 unicode6.3 |
653
|
|
|
|
|
|
|
|
654
|
|
|
|
|
|
|
L |
655
|
|
|
|
|
|
|
|
656
|
|
|
|
|
|
|
Alias: unicode-6.3 |
657
|
|
|
|
|
|
|
|
658
|
|
|
|
|
|
|
=head3 \p{Unicode} |
659
|
|
|
|
|
|
|
|
660
|
|
|
|
|
|
|
See B in |
661
|
|
|
|
|
|
|
L. |
662
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
Alias: regex-property-unicode |
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
=head3 utf8-locale |
666
|
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
See B |
668
|
|
|
|
|
|
|
L. |
669
|
|
|
|
|
|
|
|
670
|
|
|
|
|
|
|
=head3 s-utf8-delimiters |
671
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
See L: in older Perl versions, a |
673
|
|
|
|
|
|
|
hack around was possible: to specify the delimiter twice in |
674
|
|
|
|
|
|
|
substitution. Use C if your code uses it. |
675
|
|
|
|
|
|
|
|
676
|
|
|
|
|
|
|
Alias: wide-char-delimiters |
677
|
|
|
|
|
|
|
|
678
|
|
|
|
|
|
|
=head2 5.022 |
679
|
|
|
|
|
|
|
|
680
|
|
|
|
|
|
|
=head3 <<>> |
681
|
|
|
|
|
|
|
|
682
|
|
|
|
|
|
|
L |
683
|
|
|
|
|
|
|
|
684
|
|
|
|
|
|
|
Aliases: double-diamond operator-double-diamond |
685
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
=head3 \b{} |
687
|
|
|
|
|
|
|
|
688
|
|
|
|
|
|
|
L |
689
|
|
|
|
|
|
|
|
690
|
|
|
|
|
|
|
Aliases: regex-unicode-grapheme-cluster-boundary regex-unicode-boundary regex-unicode-word-boundary regex-unicode-sentence-boundary regex-unicode-line-break-boundary \b{sb} \b{wb} \b{gcb} |
691
|
|
|
|
|
|
|
|
692
|
|
|
|
|
|
|
=head3 /n |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
L |
695
|
|
|
|
|
|
|
|
696
|
|
|
|
|
|
|
Alias: regex-non-capturing |
697
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
=head3 unicode7.0 |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
See B in |
701
|
|
|
|
|
|
|
L. |
702
|
|
|
|
|
|
|
|
703
|
|
|
|
|
|
|
Alias: unicode-7.0 |
704
|
|
|
|
|
|
|
|
705
|
|
|
|
|
|
|
=head3 attr-const |
706
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
L |
708
|
|
|
|
|
|
|
|
709
|
|
|
|
|
|
|
Alias: attribute-const |
710
|
|
|
|
|
|
|
|
711
|
|
|
|
|
|
|
=head3 fileno-dir |
712
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
L |
714
|
|
|
|
|
|
|
|
715
|
|
|
|
|
|
|
=head3 ()x= |
716
|
|
|
|
|
|
|
|
717
|
|
|
|
|
|
|
L |
718
|
|
|
|
|
|
|
|
719
|
|
|
|
|
|
|
Alias: list-repetition-assignment |
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
=head3 hexfloat |
722
|
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
L |
724
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
Alias: hexadecimal-floating-numbers |
726
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
=head3 chr-inf |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
L |
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
Alias: pack-inf |
732
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
=head3 empty-slice |
734
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
L |
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
=head3 /x-unicode |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
See B in |
740
|
|
|
|
|
|
|
L. |
741
|
|
|
|
|
|
|
|
742
|
|
|
|
|
|
|
Aliases: regex-x-unicode regex-x-handles-unicode |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
=head2 5.024 |
745
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
=head3 unicode8.0 |
747
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
L. |
749
|
|
|
|
|
|
|
|
750
|
|
|
|
|
|
|
Alias: unicode-8.0 |
751
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
=head3 \b{lb} |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
L. |
755
|
|
|
|
|
|
|
|
756
|
|
|
|
|
|
|
=head3 sprintf-reorder |
757
|
|
|
|
|
|
|
|
758
|
|
|
|
|
|
|
L. |
759
|
|
|
|
|
|
|
|
760
|
|
|
|
|
|
|
Aliases: printf-precision-argument-reorder sprintf-precision-argument-reorder |
761
|
|
|
|
|
|
|
|
762
|
|
|
|
|
|
|
=head2 5.026 |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
=head3 <<~ |
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
L. |
767
|
|
|
|
|
|
|
|
768
|
|
|
|
|
|
|
Alias: heredoc-indent |
769
|
|
|
|
|
|
|
|
770
|
|
|
|
|
|
|
=head3 /xx |
771
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
L. |
773
|
|
|
|
|
|
|
|
774
|
|
|
|
|
|
|
Alias: regex-xx |
775
|
|
|
|
|
|
|
|
776
|
|
|
|
|
|
|
=head3 ^CAPTURE |
777
|
|
|
|
|
|
|
|
778
|
|
|
|
|
|
|
See C<@{^CAPTURE}>, C<%{^CAPTURE}>, and C<%{^CAPTURE_ALL}> in |
779
|
|
|
|
|
|
|
L. |
780
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
Alias: capture-variable |
782
|
|
|
|
|
|
|
|
783
|
|
|
|
|
|
|
=head3 unicode9.0 |
784
|
|
|
|
|
|
|
|
785
|
|
|
|
|
|
|
L. |
786
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
Alias: unicode-9.0 |
788
|
|
|
|
|
|
|
|
789
|
|
|
|
|
|
|
=head3 unicode-scx |
790
|
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
See I<"Use of \p{script} uses the improved Script_Extensions property"> |
792
|
|
|
|
|
|
|
in L. |
793
|
|
|
|
|
|
|
|
794
|
|
|
|
|
|
|
=head3 scalar% |
795
|
|
|
|
|
|
|
|
796
|
|
|
|
|
|
|
See L. Specifying this |
797
|
|
|
|
|
|
|
construct means the 5.026+ behaviour, i.e. C returns the number |
798
|
|
|
|
|
|
|
of keys. |
799
|
|
|
|
|
|
|
|
800
|
|
|
|
|
|
|
Alias: scalar-hash |
801
|
|
|
|
|
|
|
|
802
|
|
|
|
|
|
|
=head2 5.028 |
803
|
|
|
|
|
|
|
|
804
|
|
|
|
|
|
|
=head3 delete% |
805
|
|
|
|
|
|
|
|
806
|
|
|
|
|
|
|
See L. |
807
|
|
|
|
|
|
|
|
808
|
|
|
|
|
|
|
Alias: hash-delete-slice |
809
|
|
|
|
|
|
|
|
810
|
|
|
|
|
|
|
=head3 unicode10.0 |
811
|
|
|
|
|
|
|
|
812
|
|
|
|
|
|
|
See L. |
813
|
|
|
|
|
|
|
|
814
|
|
|
|
|
|
|
Alias: unicode-10.0 |
815
|
|
|
|
|
|
|
|
816
|
|
|
|
|
|
|
=head3 state@= |
817
|
|
|
|
|
|
|
|
818
|
|
|
|
|
|
|
See L. |
819
|
|
|
|
|
|
|
|
820
|
|
|
|
|
|
|
Aliases: state-array state-hash list-context-state |
821
|
|
|
|
|
|
|
|
822
|
|
|
|
|
|
|
=head2 5.030 |
823
|
|
|
|
|
|
|
|
824
|
|
|
|
|
|
|
=head3 unicode12.1 |
825
|
|
|
|
|
|
|
|
826
|
|
|
|
|
|
|
L |
827
|
|
|
|
|
|
|
|
828
|
|
|
|
|
|
|
Alias: unicode-12.1 |
829
|
|
|
|
|
|
|
|
830
|
|
|
|
|
|
|
=head3 uniprop_wildcards |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
L |
833
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
=head3 qr'N |
835
|
|
|
|
|
|
|
|
836
|
|
|
|
|
|
|
L |
837
|
|
|
|
|
|
|
|
838
|
|
|
|
|
|
|
Alias: named-char-in-single-quoted-regex |
839
|
|
|
|
|
|
|
|
840
|
|
|
|
|
|
|
=head3 turkic-casing |
841
|
|
|
|
|
|
|
|
842
|
|
|
|
|
|
|
See L. |
843
|
|
|
|
|
|
|
B the actual behaviour depends on the operating system's |
844
|
|
|
|
|
|
|
locale support. E.g. FreeBSD, DragonFly, and Solaris are known not to |
845
|
|
|
|
|
|
|
support it. |
846
|
|
|
|
|
|
|
|
847
|
|
|
|
|
|
|
=head3 ^RE_COMPILE_RECURSION_LIMIT |
848
|
|
|
|
|
|
|
|
849
|
|
|
|
|
|
|
Not mentioned in any Delta. See L. |
850
|
|
|
|
|
|
|
|
851
|
|
|
|
|
|
|
Alias: re-compile-recursion-limit |
852
|
|
|
|
|
|
|
|
853
|
|
|
|
|
|
|
=head2 5.032 |
854
|
|
|
|
|
|
|
|
855
|
|
|
|
|
|
|
=head3 unicode13.0 |
856
|
|
|
|
|
|
|
|
857
|
|
|
|
|
|
|
L |
858
|
|
|
|
|
|
|
|
859
|
|
|
|
|
|
|
Alias: unicode-13.0 |
860
|
|
|
|
|
|
|
|
861
|
|
|
|
|
|
|
=head3 chained-comparisons |
862
|
|
|
|
|
|
|
|
863
|
|
|
|
|
|
|
L |
864
|
|
|
|
|
|
|
|
865
|
|
|
|
|
|
|
=head3 unicode-identifier-status |
866
|
|
|
|
|
|
|
|
867
|
|
|
|
|
|
|
L |
868
|
|
|
|
|
|
|
|
869
|
|
|
|
|
|
|
Alias: unicode-identifier-type |
870
|
|
|
|
|
|
|
|
871
|
|
|
|
|
|
|
=head3 unicode-name-property |
872
|
|
|
|
|
|
|
|
873
|
|
|
|
|
|
|
L |
874
|
|
|
|
|
|
|
|
875
|
|
|
|
|
|
|
=head2 5.034 |
876
|
|
|
|
|
|
|
|
877
|
|
|
|
|
|
|
=head3 {,n} |
878
|
|
|
|
|
|
|
|
879
|
|
|
|
|
|
|
L |
880
|
|
|
|
|
|
|
|
881
|
|
|
|
|
|
|
Alias: empty-left-quantifier |
882
|
|
|
|
|
|
|
|
883
|
|
|
|
|
|
|
=head3 0o |
884
|
|
|
|
|
|
|
|
885
|
|
|
|
|
|
|
L |
886
|
|
|
|
|
|
|
|
887
|
|
|
|
|
|
|
Alias: octal-literals |
888
|
|
|
|
|
|
|
|
889
|
|
|
|
|
|
|
=head3 blanks-in-curlies |
890
|
|
|
|
|
|
|
|
891
|
|
|
|
|
|
|
L |
892
|
|
|
|
|
|
|
|
893
|
|
|
|
|
|
|
=head2 5.036 |
894
|
|
|
|
|
|
|
|
895
|
|
|
|
|
|
|
=head3 unicode14.0 |
896
|
|
|
|
|
|
|
|
897
|
|
|
|
|
|
|
L |
898
|
|
|
|
|
|
|
|
899
|
|
|
|
|
|
|
=for completeness |
900
|
|
|
|
|
|
|
=head2 old |
901
|
|
|
|
|
|
|
|
902
|
|
|
|
|
|
|
=head2 Removed Constructs |
903
|
|
|
|
|
|
|
|
904
|
|
|
|
|
|
|
Only constructs not mentioned above are listed here, i.e. constructs |
905
|
|
|
|
|
|
|
that were introduced before 5.008001. |
906
|
|
|
|
|
|
|
|
907
|
|
|
|
|
|
|
=head3 ?? |
908
|
|
|
|
|
|
|
|
909
|
|
|
|
|
|
|
Removed in 5.022. See L
|
910
|
|
|
|
|
|
|
explicit operator has been removed>. |
911
|
|
|
|
|
|
|
|
912
|
|
|
|
|
|
|
=head3 no-sigil |
913
|
|
|
|
|
|
|
|
914
|
|
|
|
|
|
|
Removed in 5.022, not documented. Before that, if the first argument |
915
|
|
|
|
|
|
|
to C, C, C, C, C, C, |
916
|
|
|
|
|
|
|
C, and C was a global variable, it was possible to omit |
917
|
|
|
|
|
|
|
its sigil, e.g. |
918
|
|
|
|
|
|
|
|
919
|
|
|
|
|
|
|
push arr, 12; # same as push @arr, 12 |
920
|
|
|
|
|
|
|
|
921
|
|
|
|
|
|
|
=head3 for-qw |
922
|
|
|
|
|
|
|
|
923
|
|
|
|
|
|
|
Removed in 5.018. See L. |
924
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
=head3 @_=split |
926
|
|
|
|
|
|
|
|
927
|
|
|
|
|
|
|
Removed in 5.012, but documented in 5.014. See L. |
928
|
|
|
|
|
|
|
|
929
|
|
|
|
|
|
|
Alias: split-populates-@_ |
930
|
|
|
|
|
|
|
|
931
|
|
|
|
|
|
|
=head2 Accepted Features |
932
|
|
|
|
|
|
|
|
933
|
|
|
|
|
|
|
Some features have been accepted in Perl (C and |
934
|
|
|
|
|
|
|
C in 5.024, C in 5.026). In the spirit of |
935
|
|
|
|
|
|
|
Syntax::Construct, you should still declare them, even if their usage |
936
|
|
|
|
|
|
|
has no effect in newer Perl versions to provide meaningful error |
937
|
|
|
|
|
|
|
messages to users of older versions. |
938
|
|
|
|
|
|
|
|
939
|
|
|
|
|
|
|
=head1 AUTHOR |
940
|
|
|
|
|
|
|
|
941
|
|
|
|
|
|
|
E. Choroba, C<< >> |
942
|
|
|
|
|
|
|
|
943
|
|
|
|
|
|
|
=head2 Contributors |
944
|
|
|
|
|
|
|
|
945
|
|
|
|
|
|
|
Gabor Szabo, JJ Merelo, tynovsky, Chris White, Mohammad S Anwar, |
946
|
|
|
|
|
|
|
Branislav Zahradnik |
947
|
|
|
|
|
|
|
|
948
|
|
|
|
|
|
|
=head1 BUGS |
949
|
|
|
|
|
|
|
|
950
|
|
|
|
|
|
|
Please report any bugs or feature requests to the GitHub repository, |
951
|
|
|
|
|
|
|
see below. |
952
|
|
|
|
|
|
|
|
953
|
|
|
|
|
|
|
=head2 Unstable Perl Versions |
954
|
|
|
|
|
|
|
|
955
|
|
|
|
|
|
|
In development versions of Perl, the removal of constructs is tested |
956
|
|
|
|
|
|
|
against the coming stable version -- e.g., 5.023 forbids all the |
957
|
|
|
|
|
|
|
removed constructs of 5.024. The behaviour of the module in such |
958
|
|
|
|
|
|
|
circumstances might still be, um, unstable. |
959
|
|
|
|
|
|
|
|
960
|
|
|
|
|
|
|
=head1 SUPPORT |
961
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
963
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
perldoc Syntax::Construct |
965
|
|
|
|
|
|
|
|
966
|
|
|
|
|
|
|
You can also look for information at: |
967
|
|
|
|
|
|
|
|
968
|
|
|
|
|
|
|
=over 4 |
969
|
|
|
|
|
|
|
|
970
|
|
|
|
|
|
|
=item * GitHub Repository |
971
|
|
|
|
|
|
|
|
972
|
|
|
|
|
|
|
L |
973
|
|
|
|
|
|
|
|
974
|
|
|
|
|
|
|
Feel free to report issues and submit pull requests. |
975
|
|
|
|
|
|
|
|
976
|
|
|
|
|
|
|
=item * MetaCPAN, Open Source Search Engine for CPAN |
977
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
L |
979
|
|
|
|
|
|
|
|
980
|
|
|
|
|
|
|
=item * CPAN Ratings |
981
|
|
|
|
|
|
|
|
982
|
|
|
|
|
|
|
L |
983
|
|
|
|
|
|
|
|
984
|
|
|
|
|
|
|
=item * Search CPAN |
985
|
|
|
|
|
|
|
|
986
|
|
|
|
|
|
|
L |
987
|
|
|
|
|
|
|
|
988
|
|
|
|
|
|
|
=back |
989
|
|
|
|
|
|
|
|
990
|
|
|
|
|
|
|
=head1 SEE ALSO |
991
|
|
|
|
|
|
|
|
992
|
|
|
|
|
|
|
L, L |
993
|
|
|
|
|
|
|
|
994
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
995
|
|
|
|
|
|
|
|
996
|
|
|
|
|
|
|
Copyright 2013 - 2023 E. Choroba. |
997
|
|
|
|
|
|
|
|
998
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
999
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
1000
|
|
|
|
|
|
|
copy of the full license at: |
1001
|
|
|
|
|
|
|
|
1002
|
|
|
|
|
|
|
L |
1003
|
|
|
|
|
|
|
|
1004
|
|
|
|
|
|
|
Any use, modification, and distribution of the Standard or Modified |
1005
|
|
|
|
|
|
|
Versions is governed by this Artistic License. By using, modifying or |
1006
|
|
|
|
|
|
|
distributing the Package, you accept this license. Do not use, modify, |
1007
|
|
|
|
|
|
|
or distribute the Package, if you do not accept this license. |
1008
|
|
|
|
|
|
|
|
1009
|
|
|
|
|
|
|
If your Modified Version has been derived from a Modified Version made |
1010
|
|
|
|
|
|
|
by someone other than you, you are nevertheless required to ensure that |
1011
|
|
|
|
|
|
|
your Modified Version complies with the requirements of this license. |
1012
|
|
|
|
|
|
|
|
1013
|
|
|
|
|
|
|
This license does not grant you the right to use any trademark, service |
1014
|
|
|
|
|
|
|
mark, tradename, or logo of the Copyright Holder. |
1015
|
|
|
|
|
|
|
|
1016
|
|
|
|
|
|
|
This license includes the non-exclusive, worldwide, free-of-charge |
1017
|
|
|
|
|
|
|
patent license to make, have made, use, offer to sell, sell, import and |
1018
|
|
|
|
|
|
|
otherwise transfer the Package with respect to any patent claims |
1019
|
|
|
|
|
|
|
licensable by the Copyright Holder that are necessarily infringed by the |
1020
|
|
|
|
|
|
|
Package. If you institute patent litigation (including a cross-claim or |
1021
|
|
|
|
|
|
|
counterclaim) against any party alleging that the Package constitutes |
1022
|
|
|
|
|
|
|
direct or contributory patent infringement, then this Artistic License |
1023
|
|
|
|
|
|
|
to you shall terminate on the date that such litigation is filed. |
1024
|
|
|
|
|
|
|
|
1025
|
|
|
|
|
|
|
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER |
1026
|
|
|
|
|
|
|
AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. |
1027
|
|
|
|
|
|
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
1028
|
|
|
|
|
|
|
PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY |
1029
|
|
|
|
|
|
|
YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR |
1030
|
|
|
|
|
|
|
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR |
1031
|
|
|
|
|
|
|
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, |
1032
|
|
|
|
|
|
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
1033
|
|
|
|
|
|
|
|
1034
|
|
|
|
|
|
|
|
1035
|
|
|
|
|
|
|
=cut |
1036
|
|
|
|
|
|
|
|
1037
|
|
|
|
|
|
|
__PACKAGE__ |