perl: minor updates in feature list
[sheet.git] / perl.inc.pl
1 use utf8;
2
3 +{
4         v5.6 => {
5                 new => [
6                         ['<code>use warnings</code>'],
7                         ['<code>use utf8</code>'],
8                         ['<code>\N{named character}</code>'],
9                         ['<code>our</code>'],
10                         ['<code>v1.2.3</code>'],
11                         ['<code>sub :locked :method</code>'],
12                         ['<code>open $fh, $mode, $expr</code>'],
13                 ],
14                 release => '2000-03-23',
15                 distro => {
16                         debian => 'woody',
17                         redhat => '2.1',
18                 },
19                 unicode => '3.0.1',
20         },
21
22         v5.8 => {
23                 new => [
24                         [q`<code>no utf8; $unicode</code>`, 'unicode overhaul: additional /\p{}/ properties'],
25                         [q`<code>binmode $fh, ':perlio'</code>`, 'file handle behaviour altered by PerlIO layers'],
26                         [q`<code>open $fh, '-|', @cmd</code>`, 'open list to fork a command without spawning a shell'],
27                         [q`<code>open $fh, '>', \$var</code>`, 'perl scalars as virtual files'],
28                         [q`<code>printf '%1$s', @args</code>`, 'syntax to use parameters out of order'],
29                         [q`<code>1_2_3 == 123</code>`, 'underscores between digits allowed in numeric constants'],
30 #                       [q`<code>use if</code>`, 'conditional module inclusion'], # also installable in earlier versions
31                 ],
32                 release => '2002-07-18',
33                 distro => {
34                         debian => 'sarge',
35                         redhat => '3.9',
36                 },
37                 unicode => '3.2.0',
38         },
39
40         v5.10 => {
41                 new => [
42                         ['<code>//</code>', 'defined-or operator'],
43                         ['<code>~~</code>', 'smart-match operator to compare different data types <small>(updated in v5.10.1)</small>'],
44                         ['<code>given</code>', 'switch statement to smart-match with <code>when</code>/<code>default</code>'],
45                         ['<code>/(?&lt;name>)/</code>', 'named capture buffers into <code>%+</code>'],
46                         ['<code>s/keep\K//</code>', 'floating positive lookbehind, efficient alternative for <code>s/(keep)/$1/</code>'],
47                         ['<code>/\v/, /\h/</code>', 'vertical and horizontal whitespace escapes'],
48                         ['<code>my $_</code>', 'lexically scoped version of the default variable'],
49                 ],
50                 release => '2007-12-18',
51                 distro => {
52                         debian => 'lenny',
53                         redhat => '6.5',
54                 },
55                 unicode => '5.0.0',
56         },
57
58         v5.12 => {
59                 new => [
60                         ['<code>package version</code>', '<code>package</code> NAME VERSION shorthand for <code>our $VERSION</code>'],
61                         ['<code>...</code>', 'yada-yada operator: code placeholder'],
62                         ['<code>use 5.012</code>', 'Implicit <code>strict</code> if use VERSION >= v5.12'],
63                         ['<code>… when</code>', '<code>when</code> is now allowed to be used as a statement modifier'],
64                         [q(<code>use overload 'qr'</code>), 'customisable conversion to regular expressions'],
65                         ['<code>/\N/</code>', 'inverse \n to match any character except newline regardless of <code>/s</code>'],
66                 ],
67                 release => '2010-04-12',
68                 unicode => '5.2',
69         },
70
71         v5.14 => {
72                 new => [
73                         ['<code>s///r</code>', 'non-destructive substitution'],
74                         ['<code>/(?^)/</code>', 'construct to reset to default modifiers'],
75                         ['<code>/(?{ m// })/</code>', 'regular expressions can be nested in <code>/(?{})/</code> and <code>/(??{})/</code>'],
76                         ["<code>use re '/flags'</code>", 'customize default modifiers'],
77                         ['<code>each $ref</code> e.a.', 'array and hash container functions accept references'],
78                         ['<code>FH->method</code>', 'filehandle method calls load IO::File on demand (eg. <code>STDOUT->flush</code>)'],
79                 ],
80                 release => '2011-05-14',
81                 distro => {
82                         debian => 'wheezy',
83                 },
84                 unicode => '6.0+#8',
85         },
86
87         v5.16 => {
88                 new => [
89                         ['<code>__SUB__</code>', 'current subroutine reference'],
90                         ['<code>fc, "\F"</code>', 'unicode foldcase to compare case-insensitively'],
91                         ['<code>"\N{}"</code>', 'automatic <code>use charnames qw( :full :short )</code>'],
92                 ],
93                 release => '2012-05-20',
94                 distro => {
95                         redhat => '7.0',
96                 },
97                 unicode => '6.1',
98         },
99
100         v5.18 => {
101                 new => [
102                         ['<code>${^LAST_FH}</code>', 'last read filehandle (used by <code>$.</code>)'],
103                         ['<code>/(?[ a + b ])/</code>', 'regex set operations (character substraction <code>-</code>, unions <code>&amp;</code>)'],
104                         ['<code>my sub foo</code>', 'lexical subroutines (also state, our)'],
105                         ['<code>next $expression</code>', 'loop controls allow runtime expressions'],
106                         [q(<code>no warnings 'experimental::…'</code>), 'mechanism for experimental features, as of now required for smartmatch'],
107                 ],
108                 release => '2013-05-18',
109                 unicode => '6.2',
110         },
111
112         v5.20 => {
113                 new => [
114                         ['<code>sub ($var)</code>', 'subroutine signatures'],
115                         ['<code>%hash{…}</code>', 'hash slices return key+value pairs'],
116                         ['<code>[]->@*</code>', 'postfix dereferencing (also e.g. <code>$scalar->$*</code> for <code>$$scalar</code>)'],
117                         [q(<code>use warnings 'once'; $a</code>), 'variables $a and $b are exempt from <em>used once</em> warnings'],
118                 ],
119                 unicode => '6.3',
120                 release => '2014-05-27',
121                 distro => {
122                         debian => 'jessie',
123                 },
124         },
125 }