perl: hint at extremeness of v5.8 compatibility
[sheet.git] / perl.plp
index 255032a7ccd488890a78b1ceb48ba24b324e9f7b..9591ad713ff26d75f1f671b750bb68fc34392f7e 100644 (file)
--- a/perl.plp
+++ b/perl.plp
@@ -2,23 +2,53 @@
 
 Html({
        title => 'perl version cheat sheet',
-       version => 'v1.0',
+       version => '1.1',
        keywords => [qw'
                perl version feature features comparison
                sheet cheat overview summary
        '],
        stylesheet => [qw'light dark red'],
+       data => ['perl.inc.pl'],
 });
 
 :>
-<h1>Perl cheat sheets</h1>
+<h1>Perl release summary</h1>
+
+<p>The most significant features introduced for recent versions of the Perl scripting language.
+Depending on desired compatibility you'll want to support a minimum of
+<span title="on dinosaur platforms such as Solaris 10, RHEL 3, SLES 8">v5.8</span> or
+<span title="on stable servers such as Debian wheezy, Ubuntu 12.04, CentOS 7">v5.14</span>.
+</p>
 
 <:
 my $info = do 'perl.inc.pl' or die $@ // $!;
-for my $ver (reverse sort keys %{$info}) {
+for my $vernum (reverse sort keys %{$info}) {
+       my $verrow = $info->{$vernum};
+       $verrow->{unstable} and next unless exists $get{v};
+
        print '<div class="section">'."\n";
-       printf '<h2>%vd</h2><dl>'."\n", $ver;
-       printf '<dt>%s<dd>%s', Entity(@{$_}), '<br/>' for @{ $info->{$ver} };
+       printf '<h2>%vd <small>%s</small></h2><dl>'."\n", $vernum, $verrow->{release};
+       for (@{ $verrow->{new} }) {
+               if (defined (my $experimental = $_->[2])) {
+                       my $title = 'experimental';
+                       my $class = ' class="ex"';
+                       if (ref \$experimental eq 'VSTRING') {
+                               my $dropped = $experimental =~ s/^\0//
+                                       and (exists $get{v} or next);
+                               $title = sprintf('%s %vd',
+                                       $dropped ? 'removed in ' : "$title until",
+                                       $experimental,
+                               );
+                               $experimental = $_->[3];  # optional additional class
+                       }
+                       if ($experimental) {
+                               $class .= sprintf ' title="%s"', $experimental;
+                       }
+                       $_->[1] .= qq{ <em$class>($title)</em>};
+               }
+               printf '<dt>%s<dd>%s'."\n", @{$_}, '<br/>'
+       }
+       printf '<dt>Unicode</dt><dd>v%s'."\n", $_ for $verrow->{unicode} || ();
        print "</dl>\n";
        print "</div>\n\n";
 }