File Coverage

blib/lib/Syntax/Construct.pm
Criterion Covered Total %
statement 50 58 86.2
branch 27 36 75.0
condition 6 11 54.5
subroutine 14 15 93.3
pod 2 2 100.0
total 99 122 81.1


line stmt bran cond sub pod time code
1             package Syntax::Construct;
2              
3 7     7   989781 use 5.006002;
  7         25  
4 7     7   35 use strict;
  7         15  
  7         254  
5 7     7   46 use warnings;
  7         29  
  7         1390  
6              
7             our $VERSION = '1.045';
8              
9 7     7   50 my %introduces = do { no warnings 'qw';
  7         45  
  7         4778  
10             ( '5.042' => [qw[
11             :writer my_method ->& unicode16.0 ^^=
12             ]],
13             '5.040' => [qw[
14             ^^ __CLASS__ :reader
15             ]],
16             '5.038' => [qw[
17             unicode15.0 ^HOOK signature-default-operator
18             INCDIR *{} REG_INF_I32_MAX
19             ^LAST_SUCCESSFUL_PATTERN
20             ]],
21             '5.036' => [qw[
22             unicode14.0
23             ]],
24             '5.034' => [qw[
25             {,n} 0o blanks-in-curlies
26             ]],
27             '5.032' => [qw[
28             unicode13.0 chained-comparisons
29             unicode-identifier-status
30             unicode-name-property
31             ]],
32             '5.030' => [qw[
33             unicode12.1 uniprop_wildcards qr'N
34             turkic-casing ^RE_COMPILE_RECURSION_LIMIT
35             ]],
36             '5.028' => [qw[
37             delete% unicode10.0 state@=
38             ]],
39             '5.026' => [qw[
40             <<~ /xx ^CAPTURE unicode9.0 unicode-scx scalar%
41             ]],
42             '5.024' => [qw[
43             unicode8.0 \b{lb} sprintf-reorder
44             ]],
45             '5.022' => [qw[
46             <<>> \b{} /n unicode7.0 attr-const
47             fileno-dir ()x= hexfloat chr-inf
48             empty-slice /x-unicode
49             ]],
50             '5.020' => [qw[
51             attr-prototype drand48 %slice
52             unicode6.3 \p{Unicode} utf8-locale
53             s-utf8-delimiters
54             ]],
55             '5.018' => [qw[
56             computed-labels while-each method-on-any-string
57             split-space
58             ]],
59             '5.016' => [qw[
60             charnames __FILE__()
61             ]],
62             '5.014' => [qw[
63             ?^ /r /d /l /u /a auto-deref
64             ^GLOBAL_PHASE \o package-block
65             srand-return prototype+ sig-warn-obj
66             ]],
67             '5.012' => [qw[
68             package-version ... each-array
69             keys-array values-array delete-local
70             length-undef \N while-readdir
71             ]],
72             '5.010' => [qw[
73             // ?PARNO ?<> ?| quant+ regex-verbs
74             \K \R \v \h \gN readline()
75             stack-file-test recursive-sort /p
76             lexical-$_ pack<
77             ]],
78             '5.008001' => [qw[
79             s-utf8-delimiters-hack
80             ]],
81             old => [qw[
82             ?? for-qw @_=split no-sigil
83             ]],
84             )};
85              
86             my %removed = ( 'auto-deref' => '5.024',
87             'lexical-$_' => '5.024',
88             '??' => '5.022',
89             'no-sigil' => '5.022',
90             's-utf8-delimiters-hack' => '5.020',
91             'for-qw' => '5.018',
92             '@_=split' => '5.012',
93             );
94              
95             my %alias = (
96             # old
97             'split-populates-@_' => '@_=split',
98             # 5.010
99             '\H' => '\h',
100             '\V' => '\v',
101             'defined-or' => '//',
102             'lexical-default-variable' => 'lexical-$_',
103             'pack-byte-order-modifiers' => 'pack<',
104             'readline-argv' => 'readline()',
105             'regex-generic-linebreak' => '\R',
106             'regex-horizontal-whitespace' => '\h',
107             'regex-keep-left' => '\K',
108             'regex-named-capture-group' => '?<>',
109             'regex-possessive-quantifier' => 'quant+',
110             'regex-possessive-match' => 'quant+',
111             'regex-preserve-match-captures' => '/p',
112             'regex-recursive-subpattern' => '?PARNO',
113             'regex-relative-backreference' => '\gN',
114             'regex-reset-branch' => '?|',
115             'regex-vertical-whitespace' => '\v',
116             # 5.012
117             'statement-ellipsis' => '...',
118             'yada-yada' => '...',
119             'triple-dot' => '...',
120             'regex-non-newline' => '\N',
121             # 5.014
122             'non-destructive-subst' => '/r',
123             'non-destructive-substitution' => '/r',
124             'regex-restrict-ascii-range' => '/a',
125             'regex-unicode-strings' => '/u',
126             'regex-use-default-modifiers' => '?^',
127             'regex-compile-as-default' => '/d',
128             'regex-compile-as-locale' => '/l',
129             'regex-compile-as-unicode-strings' => '/u',
130             'global-phase' => '^GLOBAL_PHASE',
131             'octal-escape' => '\o',
132             # 5.016
133             '__LINE__()' => '__FILE__()',
134             '__PACKAGE__()' => '__FILE__()',
135             # 5.020
136             'hash-slice' => '%slice',
137             'attribute-prototype' => 'attr-prototype',
138             'regex-property-unicode' => '\p{Unicode}',
139             'wide-char-delimiters' => 's-utf8-delimiters',
140             'unicode-6.3' => 'unicode6.3',
141             # 5.022
142             'double-diamond' => '<<>>',
143             'operator-double-diamond' => '<<>>',
144             'regex-non-capturing' => '/n',
145             '\b{gcb}' => '\b{}',
146             '\b{wb}' => '\b{}',
147             '\b{sb}' => '\b{}',
148             'regex-unicode-boundary' => '\b{}',
149             'regex-unicode-grapheme-cluster-boundary' => '\b{}',
150             'regex-unicode-word-boundary' => '\b{}',
151             'regex-unicode-sentence-boundary' => '\b{}',
152             'attribute-const' => 'attr-const',
153             'list-repetition-assignment' => '()x=',
154             'hexadecimal-floating-numbers' => 'hexfloat',
155             'pack-inf' => 'chr-inf',
156             'regex-x-unicode' => '/x-unicode',
157             'regex-x-handles-unicode' => '/x-unicode',
158             'unicode-7.0' => 'unicode7.0',
159             # 5.024
160             'unicode-8.0' => 'unicode8.0',
161             'regex-unicode-line-break-boundary' => '\b{lb}',
162             'printf-precision-argument-reorder' => 'sprintf-reorder',
163             'sprintf-precision-argument-reorder' => 'sprintf-reorder',
164             # 5.026
165             'unicode-9.0' => 'unicode9.0',
166             'heredoc-indent' => '<<~',
167             'regex-xx' => '/xx',
168             'capture-variable' => '^CAPTURE',
169             'scalar-hash' => 'scalar%',
170             # 5.028
171             'hash-delete-slice' => 'delete%',
172             'unicode-10.0' => 'unicode10.0',
173             'state-array' => 'state@=',
174             'state-hash' => 'state@=',
175             'list-context-state' => 'state@=',
176             # 5.030
177             'named-char-in-single-quoted-regex' => "qr'N",
178             'unicode-12.1' => 'unicode12.1',
179             're-compile-recursion-limit' => '^RE_COMPILE_RECURSION_LIMIT',
180             # 5.032
181             'unicode-13.0' => 'unicode13.0',
182             'unicode-identifier-type' => 'unicode-identifier-status',
183             # 5.034
184             'empty-left-quantifier' => '{,n}',
185             'octal-literals' => '0o',
186             # 5.038
187             'keyword-hook' => '^HOOK',
188             'optimistic-eval' => '*{}',
189             # 5.040
190             'logical-xor' => '^^',
191             # 5.042
192             'lexical-method-invocation-operator' => '->&',
193             'assign-logical-xor' => '^^=',
194             );
195              
196             my %_introduced = map {
197             my $version = $_;
198             map { $_ => $version } @{ $introduces{$version} }
199             } keys %introduces;
200              
201             my %introduced = %_introduced;
202             delete @introduced{ @{ $introduces{old} } };
203              
204             sub _hook {
205             { drand48 => sub {
206 1     1   10 require Config;
207             warn "Unknown rand implementation at ", _position(1), ".\n"
208 1 50       152 unless 'Perl_drand48' eq $Config::Config{randfunc};
209             },
210             'turkic-casing' => sub {
211 1 50   1   1 eval {
212 7     7   3625 use locale;
  7         5437  
  7         38  
213 1         752 require POSIX;
214 1         15170 my $orig_locale = POSIX::setlocale(POSIX::LC_CTYPE());
215 1 50 50     569 (POSIX::setlocale(POSIX::LC_CTYPE(), 'tr_TR.UTF-8') || "")
216             eq 'tr_TR.UTF-8' or die;
217 0         0 my $cmp = lc 'I' ne 'i';
218 0         0 POSIX::setlocale(POSIX::LC_CTYPE(), $orig_locale);
219 0         0 $cmp
220             } or die 'Turkic locale casing not working at '
221             . _position(1) . "\.\n";
222             },
223             }
224 106     106   1046 }
225              
226              
227             sub removed {
228 105     105 1 301632 my $construct = shift;
229             return $construct
230             ? $removed{$construct}
231 105 100 66     815 || $alias{$construct} && $removed{ $alias{$construct} }
232             : keys %removed
233             }
234              
235              
236             sub introduced {
237 5     5 1 412071 my $construct = shift;
238             return $construct
239             ? $introduced{$construct}
240 5 100 66     76 || $alias{$construct} && $introduced{ $alias{$construct} }
241             : keys %introduced
242             }
243              
244              
245             sub _position {
246 11     11   259 join ' line ', (caller(1 + !! shift))[1,2]
247             }
248              
249              
250             sub import {
251 109     109   259677 shift;
252 109         176 my $min_version = 0;
253 109         181 my $max_version = 6;
254 109         266 my ($constr, $d_constr);
255 109         0 my @actions;
256 109         252 for my $name (@_) {
257 108 100       370 local $_ = exists $alias{$name} ? $alias{$name} : $name;
258 108 100       373 if ($introduced{$_}) {
    100          
259             ($min_version, $constr) = ($introduced{$_}, $name)
260 103 50       539 if $introduced{$_} gt $min_version;
261             } elsif (! $removed{$_}) {
262 1         3 die "Unknown construct `$name' at ",
263             _position(),
264             ". Try upgrading Syntax::Construct first.\n"
265             }
266              
267 107 100       310 if ($removed{$_}) {
268             ($max_version, $d_constr) = ($removed{$_}, $name)
269 7 50       36 if $removed{$_} lt $max_version;
270             }
271              
272 107         242 my $action = _hook()->{$_};
273 107 100       1176 push @actions, $action if $action;
274             }
275 108 100       295 die 'Empty construct list at ', _position(), ".\n" unless @_;
276              
277 107         244 my $nearest_stable = _nearest_stable();
278 107 100       345 if ($max_version le $nearest_stable) {
279 7 50 33     18 warn "Faking version $nearest_stable to test removed constructs.\n"
280             if ! _is_stable($]) && $max_version eq $nearest_stable;
281 7         29 die "$d_constr removed in $max_version at ", _position(), ".\n";
282             }
283              
284 100 100       229 die "Unsupported construct $constr at ", _position(),
285             sprintf " (Perl %s needed)\n", $min_version
286             unless $min_version le $];
287              
288 99         353 $_->() for @actions;
289             }
290              
291              
292             sub _is_stable {
293 132     132   268050 my ($version) = @_;
294 132         1005 return $version =~ /^[0-5]\.[0-9][0-9][02468]/
295             }
296              
297             sub _nearest_stable {
298 107 50   107   284 return $] if _is_stable($]);
299 0           my ($major, $minor) = $] =~ /^([0-5])\.([0-9][0-9][13579])/;
300 0           ++$minor;
301 0           return "$major.$minor"
302             }
303              
304              
305 0 0   0     sub _is_old_empty { @{ $introduces{old} } ? 0 : 1 }
  0            
306              
307              
308             =head1 NAME
309              
310             Syntax::Construct - Explicitly state which non-feature constructs are used in the code.
311              
312             =head1 VERSION
313              
314             Version 1.045
315              
316             =head1 SYNOPSIS
317              
318             For some new syntactic constructs, there is the L pragma. For
319             the rest, there is B.
320              
321             use Syntax::Construct qw( // ... /r );
322              
323             my $x = shift // 'default';
324             my $y = $x =~ s/de(fault)/$1/r;
325             if ($y =~ /^fault/) {
326             ...
327             }
328              
329             There are two subroutines (not exported) which you can use to query
330             the lists of constructs programmatically: C and
331             C (see below).
332              
333             my @constructs = Syntax::Construct::introduced();
334             say "$_ was introduced in ",
335             Syntax::Construct::introduced($_) for @constructs;
336              
337             =head1 DESCRIPTION
338              
339             This module provides a simple way of specifying syntactic constructs
340             that are not implemented via the L pragma, but are still not
341             compatible with older versions of Perl.
342              
343             It's the programmer's responsibility to track the constructs and list
344             them (but see L on how to extract the
345             information from existing code).
346              
347             Using C doesn't really change
348             anything if you're running Perl 5.010+, but it gives much better error
349             messages in older versions:
350              
351             Unsupported construct //
352              
353             instead of
354              
355             Search pattern not terminated
356              
357             Three groups of people can benefit from the module:
358              
359             =over 4
360              
361             =item 1.
362              
363             The authors of the module using L win, as they have
364             all the constructs in one place (i.e. L's
365             documentation) and they don't waste their time searching through
366             perldeltas and other places.
367              
368             =item 2.
369              
370             Users of their modules win as they get meaningful error messages
371             telling them which Perl version they need to upgrade to.
372              
373             =item 3.
374              
375             The programmer they hired to work around the problem wins as they know
376             what constructs to replace in the code to make it run in the ancient
377             version.
378              
379             =back
380              
381             =head2 Good Practice
382              
383             Some programmers just use all the I their current Perl
384             version provides without any notice. This leads to weird error
385             messages in older Perl versions.
386              
387             Some other programmers will place C towards the top of the
388             script, even if the only I they use is the C operator
389             available in 5.010 already. This prevents users of older versions of
390             Perl to run the script, even if it would otherwise be easily possible.
391              
392             The kindest programmers will add C towards the top of
393             the script. But it means they have to remember or find out what
394             version introduced the I they use.
395              
396             B liberates you from the need to remember all the
397             I together with Perl versions that introduced them. It
398             makes it easier for users of older Perl versions to migrate your code
399             to their system. And finally, it improves the error messages they get.
400              
401             Similarly, it's a good practice to keep specifying C
402             postderef };> even if it's a no-op since 5.024: it makes your script
403             available for people running older Perl versions. The same applies to
404             C in 5.016 and later, etc.
405              
406             =head1 EXPORT
407              
408             Nothing. Using B with no parameters is an error,
409             giving it an empty list is a no-op (but you can then access the
410             C and C subroutines).
411              
412             =over 4
413              
414             =item introduced
415              
416             Without arguments, returns a list of all the supported
417             constructs. With an argument, returns the version in which the given
418             construct was introduced.
419              
420             =item removed
421              
422             Same as C, but for removed constructs (e.g. auto-deref in
423             5.024).
424              
425             =back
426              
427             =head1 RECOGNISED CONSTRUCTS
428              
429             =head2 5.008001
430              
431             =head3 s-utf8-delimiters-hack
432              
433             See L. The hack doesn't seem to work in 5.008
434             and older. Removed in 5.020.
435              
436             =head2 5.010
437              
438             =head3 recursive-sort
439              
440             L.
441              
442             =head3 //
443              
444             L or L.
445              
446             Alias: defined-or
447              
448             =head3 ?PARNO
449              
450             "Recursive Patterns" under L or
451             L.
452              
453             Alias: regex-recursive-subpattern
454              
455             =head3 ?<>
456              
457             "Named Capture Buffers" under L or
458             LNAMEE<62>pattern)">.
459              
460             Alias: regex-named-capture-group
461              
462             =head3 ?|
463              
464             Not mentioned in any Delta. See B<(?|pattern)> in L.
465              
466             Alias: regex-reset-branch
467              
468             =head3 quant+
469              
470             "Possessive Quantifiers" under L or
471             L.
472              
473             Aliases: regex-possessive-quantifier regex-possessive-match
474              
475             =head3 regex-verbs
476              
477             "Backtracking control verbs" under L
478             expressions> or L.
479              
480              
481             =head3 \K
482              
483             "\K escape" under L or
484             L.
485              
486             Alias: regex-keep-left
487              
488             =head3 \R \v \h
489              
490             Covers C<\V> and C<\H>, too. See "Vertical and horizontal whitespace,
491             and linebreak" under L or
492             L.
493              
494             Aliases: \H \V regex-generic-linebreak regex-horizontal-whitespace regex-vertical-whitespace
495              
496             =head3 \gN
497              
498             "Relative backreferences" under L or
499             L.
500              
501             Alias: regex-relative-backreference
502              
503             =head3 readline()
504              
505             L.
506              
507             Alias: readline-argv
508              
509             =head3 stack-file-test
510              
511             L.
512              
513             =head3 /p
514              
515             C

(preserve) modifier and C<${^PREMATCH}>, C<${^MATCH}> and
516             C<${^POSTMATCH}> variables. Not mentioned in any Delta. See
517             L.
518              
519             Alias: regex-preserve-match-captures
520              
521             =head3 lexical-$_
522              
523             L. Removed in 5.024.
524              
525             Alias: lexical-default-variable
526              
527             =head3 pack<
528              
529             See L
530              
531             Alias: pack-byte-order-modifiers
532              
533             =head2 5.012
534              
535             =head3 package-version
536              
537             L
538              
539             =head3 ...
540              
541             L or L
542              
543             Aliases: yada-yada triple-dot statement-ellipsis
544              
545             =head3 each-array
546              
547             L
548              
549             =head3 keys-array
550              
551             L
552              
553             =head3 values-array
554              
555             L
556              
557             =head3 delete-local
558              
559             L
560              
561             =head3 length-undef
562              
563             See the ninth bullet in L
564             changes>.
565              
566             =head3 \N
567              
568             L.
569              
570             Alias: regex-non-newline
571              
572             =head3 while-readdir
573              
574             C in a while-loop condition populates C<$_>. Not mentioned in
575             any delta, but see C in L.
576              
577             =head2 5.014
578              
579             =head3 ?^
580              
581             L.
582              
583             Alias: regex-use-default-modifiers
584              
585             =head3 /r
586              
587             L and L.
588              
589             Aliases: non-destructive-subst non-destructive-substitution
590              
591             =head3 /d
592              
593             L and L.
594              
595             Alias: regex-compile-as-default
596              
597             =head3 /l
598              
599             L and L.
600              
601             Alias: regex-compile-as-locale
602              
603             =head3 /u
604              
605             L and L.
606              
607             Aliases: regex-unicode-strings regex-compile-as-unicode-strings
608              
609             =head3 /a
610              
611             L and L.
612              
613             Alias: regex-restrict-ascii-range
614              
615             =head3 auto-deref
616              
617             L
618             references>. See also C, C, C, C,
619             C, C, C, and C in L.
620             Removed in 5.024.
621              
622             =head3 ^GLOBAL_PHASE
623              
624             See B under
625             L.
626              
627             Alias: global-phase
628              
629             =head3 \o
630              
631             L.
632              
633             Alias: octal-escape
634              
635             =head3 package-block
636              
637             See B under L.
638              
639             =head3 srand-return
640              
641             See B under L.
642              
643             =head3 prototype+
644              
645             See L.
646              
647             =head3 sig-warn-obj
648              
649             See the second bullet in L.
650              
651             =head2 5.016
652              
653             =head3 charnames
654              
655             See L.
656              
657             =head3 __FILE__()
658              
659             See L.
660              
661             Aliases: __LINE__() __PACKAGE__()
662              
663             =head2 5.018
664              
665             =head3 computed-labels
666              
667             L
668              
669             =head3 while-each
670              
671             See in L or C in L.
672              
673             =head3 method-on-any-string
674              
675             See [perl #105922] in L.
676              
677             =head3 split-space
678              
679             See L.
680              
681             =head2 5.020
682              
683             =head3 attr-prototype
684              
685             L
686              
687             Alias: attribute-prototype
688              
689             =head3 drand48
690              
691             L.
692             Note that on OpenBSD, Perl 5.020+ uses the system's own C
693             unless seeded.
694              
695             =head3 %slice
696              
697             L
698              
699             Alias: hash-slice
700              
701             =head3 unicode6.3
702              
703             L
704              
705             Alias: unicode-6.3
706              
707             =head3 \p{Unicode}
708              
709             See B in
710             L.
711              
712             Alias: regex-property-unicode
713              
714             =head3 utf8-locale
715              
716             See B in
717             L.
718              
719             =head3 s-utf8-delimiters
720              
721             See L: in older Perl versions, a
722             hack around was possible: to specify the delimiter twice in
723             substitution. Use C if your code uses it.
724              
725             Alias: wide-char-delimiters
726              
727             =head2 5.022
728              
729             =head3 <<>>
730              
731             L
732              
733             Aliases: double-diamond operator-double-diamond
734              
735             =head3 \b{}
736              
737             L
738              
739             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}
740              
741             =head3 /n
742              
743             L
744              
745             Alias: regex-non-capturing
746              
747             =head3 unicode7.0
748              
749             See B in
750             L.
751              
752             Alias: unicode-7.0
753              
754             =head3 attr-const
755              
756             L
757              
758             Alias: attribute-const
759              
760             =head3 fileno-dir
761              
762             L
763              
764             =head3 ()x=
765              
766             L
767              
768             Alias: list-repetition-assignment
769              
770             =head3 hexfloat
771              
772             L
773              
774             Alias: hexadecimal-floating-numbers
775              
776             =head3 chr-inf
777              
778             L
779              
780             Alias: pack-inf
781              
782             =head3 empty-slice
783              
784             L
785              
786             =head3 /x-unicode
787              
788             See B in
789             L.
790              
791             Aliases: regex-x-unicode regex-x-handles-unicode
792              
793             =head2 5.024
794              
795             =head3 unicode8.0
796              
797             L.
798              
799             Alias: unicode-8.0
800              
801             =head3 \b{lb}
802              
803             L.
804              
805             =head3 sprintf-reorder
806              
807             L.
808              
809             Aliases: printf-precision-argument-reorder sprintf-precision-argument-reorder
810              
811             =head2 5.026
812              
813             =head3 <<~
814              
815             L.
816              
817             Alias: heredoc-indent
818              
819             =head3 /xx
820              
821             L.
822              
823             Alias: regex-xx
824              
825             =head3 ^CAPTURE
826              
827             See C<@{^CAPTURE}>, C<%{^CAPTURE}>, and C<%{^CAPTURE_ALL}> in
828             L.
829              
830             Alias: capture-variable
831              
832             =head3 unicode9.0
833              
834             L.
835              
836             Alias: unicode-9.0
837              
838             =head3 unicode-scx
839              
840             See I<"Use of \p{script} uses the improved Script_Extensions property">
841             in L.
842              
843             =head3 scalar%
844              
845             See L. Specifying this
846             construct means the 5.026+ behaviour, i.e. C returns the number
847             of keys.
848              
849             Alias: scalar-hash
850              
851             =head2 5.028
852              
853             =head3 delete%
854              
855             See L.
856              
857             Alias: hash-delete-slice
858              
859             =head3 unicode10.0
860              
861             See L.
862              
863             Alias: unicode-10.0
864              
865             =head3 state@=
866              
867             See L.
868              
869             Aliases: state-array state-hash list-context-state
870              
871             =head2 5.030
872              
873             =head3 unicode12.1
874              
875             L
876              
877             Alias: unicode-12.1
878              
879             =head3 uniprop_wildcards
880              
881             L
882              
883             =head3 qr'N
884              
885             L
886              
887             Alias: named-char-in-single-quoted-regex
888              
889             =head3 turkic-casing
890              
891             See L.
892             B the actual behaviour depends on the operating system's
893             locale support. E.g. FreeBSD, DragonFly, and Solaris are known not to
894             support it.
895              
896             =head3 ^RE_COMPILE_RECURSION_LIMIT
897              
898             Not mentioned in any Delta. See L.
899              
900             Alias: re-compile-recursion-limit
901              
902             =head2 5.032
903              
904             =head3 unicode13.0
905              
906             L
907              
908             Alias: unicode-13.0
909              
910             =head3 chained-comparisons
911              
912             L
913              
914             =head3 unicode-identifier-status
915              
916             L
917              
918             Alias: unicode-identifier-type
919              
920             =head3 unicode-name-property
921              
922             L
923              
924             =head2 5.034
925              
926             =head3 {,n}
927              
928             L
929              
930             Alias: empty-left-quantifier
931              
932             =head3 0o
933              
934             L
935              
936             Alias: octal-literals
937              
938             =head3 blanks-in-curlies
939              
940             L
941              
942             =head2 5.036
943              
944             =head3 unicode14.0
945              
946             L
947              
948             =head2 5.038
949              
950             =head3 unicode15.0
951              
952             L
953              
954             =head3 ^HOOK
955              
956             L
957              
958             Alias: keyword-hook
959              
960             =head3 signature-default-operator
961              
962             L
963              
964             =head3 INCDIR
965              
966             L
967              
968             =head3 *{}
969              
970             L
971              
972             Alias: optimistic-eval
973              
974             =head3 REG_INF_I32_MAX
975              
976             L
977              
978             =head3 ^LAST_SUCCESSFUL_PATTERN
979              
980             L
981              
982             =head2 5.040
983              
984             =head3 ^^
985              
986             L
987              
988             Alias: logical-xor
989              
990             =head3 __CLASS__
991              
992             L.
993              
994             =head3 :reader
995              
996             L
997              
998             =head2 5.042
999              
1000             =head3 :writer
1001              
1002             L
1003              
1004             =head3 my_method
1005              
1006             L
1007              
1008             =head3 ->&
1009              
1010             L<< perl5420delta/Lexical method invocation operator ->& >>
1011              
1012             Alias: lexical-method-invocation-operator
1013              
1014             =head3 unicode16.0
1015              
1016             L
1017              
1018             =head3 ^^=
1019              
1020             L
1021              
1022             Alias: assign-logical-xor
1023              
1024             =for completeness
1025             =head2 old
1026              
1027             =head2 Removed Constructs
1028              
1029             Only constructs not mentioned above are listed here, i.e. constructs
1030             that were introduced before 5.008001.
1031              
1032             =head3 ??
1033              
1034             Removed in 5.022. See L
1035             explicit operator has been removed>.
1036              
1037             =head3 no-sigil
1038              
1039             Removed in 5.022, not documented. Before that, if the first argument
1040             to C, C, C, C, C, C,
1041             C, and C was a global variable, it was possible to omit
1042             its sigil, e.g.
1043              
1044             push arr, 12; # same as push @arr, 12
1045              
1046             =head3 for-qw
1047              
1048             Removed in 5.018. See L.
1049              
1050             =head3 @_=split
1051              
1052             Removed in 5.012, but documented in 5.014. See L.
1053              
1054             Alias: split-populates-@_
1055              
1056             =head2 Accepted Features
1057              
1058             Some features have been accepted in Perl (C and
1059             C in 5.024, C in 5.026). In the spirit of
1060             Syntax::Construct, you should still declare them, even if their usage
1061             has no effect in newer Perl versions to provide meaningful error
1062             messages to users of older versions.
1063              
1064             =head1 AUTHOR
1065              
1066             E. Choroba, C<< >>
1067              
1068             =head2 Contributors
1069              
1070             Gabor Szabo, JJ Merelo, tynovsky, Chris White, Mohammad S Anwar,
1071             Branislav Zahradnik
1072              
1073             =head1 BUGS
1074              
1075             Please report any bugs or feature requests to the GitHub repository,
1076             see below.
1077              
1078             =head2 Unstable Perl Versions
1079              
1080             In development versions of Perl, the removal of constructs is tested
1081             against the coming stable version -- e.g., 5.023 forbids all the
1082             removed constructs of 5.024. The behaviour of the module in such
1083             circumstances might still be, um, unstable.
1084              
1085             =head1 SUPPORT
1086              
1087             You can find documentation for this module with the perldoc command.
1088              
1089             perldoc Syntax::Construct
1090              
1091             You can also look for information at:
1092              
1093             =over 4
1094              
1095             =item * GitHub Repository
1096              
1097             L
1098              
1099             Feel free to report issues and submit pull requests.
1100              
1101             =item * MetaCPAN, Open Source Search Engine for CPAN
1102              
1103             L
1104              
1105             =item * Search CPAN
1106              
1107             L
1108              
1109             =back
1110              
1111             =head1 SEE ALSO
1112              
1113             L, L
1114              
1115             =head1 LICENSE AND COPYRIGHT
1116              
1117             Copyright 2013 - 2026 E. Choroba.
1118              
1119             This program is free software; you can redistribute it and/or modify it
1120             under the terms of the the Artistic License (2.0). You may obtain a
1121             copy of the full license at:
1122              
1123             L
1124              
1125             Any use, modification, and distribution of the Standard or Modified
1126             Versions is governed by this Artistic License. By using, modifying or
1127             distributing the Package, you accept this license. Do not use, modify,
1128             or distribute the Package, if you do not accept this license.
1129              
1130             If your Modified Version has been derived from a Modified Version made
1131             by someone other than you, you are nevertheless required to ensure that
1132             your Modified Version complies with the requirements of this license.
1133              
1134             This license does not grant you the right to use any trademark, service
1135             mark, tradename, or logo of the Copyright Holder.
1136              
1137             This license includes the non-exclusive, worldwide, free-of-charge
1138             patent license to make, have made, use, offer to sell, sell, import and
1139             otherwise transfer the Package with respect to any patent claims
1140             licensable by the Copyright Holder that are necessarily infringed by the
1141             Package. If you institute patent litigation (including a cross-claim or
1142             counterclaim) against any party alleging that the Package constitutes
1143             direct or contributory patent infringement, then this Artistic License
1144             to you shall terminate on the date that such litigation is filed.
1145              
1146             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
1147             AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
1148             THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
1149             PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
1150             YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
1151             CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
1152             CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
1153             EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1154              
1155              
1156             =cut
1157              
1158             __PACKAGE__