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
20 my $info = do 'perl.inc.pl' or die $@ // $!;
22 say "Depending on desired compatibility you'll want to support a minimum of";
23 say join(' or ', map {
24 sprintf '<span title="on %s">v%vd</span>', $info->{$_}->{distrosum}, $_
28 for my $vernum (reverse sort keys %{$info}) {
29 my $verrow = $info->{$vernum};
30 defined $verrow->{unstable} and next unless exists $get{v};
32 say '<div class="section">';
33 say sprintf '<h2>%vd <small>%s</small></h2>', $vernum, $verrow->{release};
35 for (@{ $verrow->{new} }) {
36 my ($topic, $desc, $attr) = @{$_};
39 if (defined $attr->{experimental}) {
40 $title = 'experimental';
42 if ($attr->{dropped}) {
43 next unless exists $get{v};
44 $title = sprintf 'removed in %vd', $attr->{dropped};
46 elsif ($attr->{stable}) {
47 $title .= sprintf ' until %vd', $attr->{stable};
49 if ($attr->{experimental}) {
50 $title = sprintf '<span title="experimental::%s">%s</span>',
51 $attr->{experimental}, $title;
53 if ($attr->{feature}) {
54 my $prefix = sprintf '<span title="%s">feature</span>',
56 $title = join ', ', $prefix, $title // ();
58 $desc .= sprintf ' <em class="ex">(%s)</em>', $title;
60 say sprintf '<dt>%s<dd>%s', $topic, $desc || '<br/>';
62 say sprintf '<dt>Unicode</dt><dd>v%s', $_ for $verrow->{unicode} || ();