4 title => 'perl version cheat sheet',
7 perl version feature features comparison
8 sheet cheat overview summary
10 stylesheet => [qw'light dark red'],
11 data => ['perl.inc.pl'],
15 <h1>Perl release summary</h1>
17 <p>The most significant features introduced for recent versions of the Perl
19 Depending on desired compatibility you'll want to support a minimum of
20 <span title="on dinosaur platforms such as Solaris 10, AIX 5.2, RHEL 3, SLES 8">v5.8</span> or
21 <span title="on stable servers such as Debian wheezy, Ubuntu 12.04, CentOS 7">v5.14</span>.
25 my $info = do 'perl.inc.pl' or die $@ // $!;
26 for my $vernum (reverse sort keys %{$info}) {
27 my $verrow = $info->{$vernum};
28 defined $verrow->{unstable} and next unless exists $get{v};
30 say '<div class="section">';
31 say sprintf '<h2>%vd <small>%s</small></h2>', $vernum, $verrow->{release};
33 for (@{ $verrow->{new} }) {
34 my ($topic, $desc, $attr) = @{$_};
37 if (defined $attr->{experimental}) {
38 $title = 'experimental';
40 if ($attr->{dropped}) {
41 next unless exists $get{v};
42 $title = sprintf 'removed in %vd', $attr->{dropped};
44 elsif ($attr->{stable}) {
45 $title .= sprintf ' until %vd', $attr->{stable};
47 if ($attr->{experimental}) {
48 $title = sprintf '<span title="experimental::%s">%s</span>',
49 $attr->{experimental}, $title;
51 if ($attr->{feature}) {
52 my $prefix = sprintf '<span title="%s">feature</span>',
54 my $title = join ', ', $prefix, $title // ();
56 $desc .= sprintf ' <em class="ex">(%s)</em>', $title;
58 say sprintf '<dt>%s<dd>%s', $topic, $desc || '<br/>';
60 say sprintf '<dt>Unicode</dt><dd>v%s', $_ for $verrow->{unicode} || ();