index: release v1.18 with only altgr index linked
[sheet.git] / perl.plp
index 1f5cfe79fa41360d75907ded5cb2003423d7807b..596e4d84d80afeafe4dece3facdbe662e04d326c 100644 (file)
--- a/perl.plp
+++ b/perl.plp
@@ -2,7 +2,7 @@
 
 Html({
        title => 'perl version cheat sheet',
-       version => '1.4',
+       version => '1.6',
        keywords => [qw'
                perl version feature features comparison
                sheet cheat overview summary
@@ -11,6 +11,7 @@ Html({
        data => ['perl.inc.pl'],
 });
 
+use experimental 'signatures';
 :>
 <h1>Perl release summary</h1>
 
@@ -56,8 +57,9 @@ eval {
        $info->{$vcore}{versum} //= "official security patches";
 
        # «We encourage vendors to ship the most recent supported release of Perl
-       # at the time of their code freeze» with debian&ubuntu having 5 years LTS
-       my $vendoreol = ($now - ONE_YEAR * 5)->strftime('%F');
+       # at the time of their code freeze»
+       # assume debian ships after 1 year, and expires after 5 years LTS
+       my $vendoreol = ($now - ONE_YEAR * 6)->strftime('%F');
        my $vdebian = first {
                $info->{$_}{release} ge $vendoreol && $info->{$_}{distro}{debian}
        } @versions;
@@ -111,7 +113,7 @@ sub featattrs ($attr) {
                $title = 'experimental';
        }
        if (defined $attr->{dropped}) {
-               next unless exists $get{v};
+               return '' unless exists $get{v};
                $title = sprintf 'removed in %vd', $_ for $attr->{dropped} || ();
        }
        elsif ($attr->{stable}) {
@@ -131,7 +133,9 @@ sub featattrs ($attr) {
        $title = $title ? sprintf ' <em class="ex">(%s)</em>', $title : '';
 
        if (my $eg = $attr->{eg}) {
-               my $pre = sprintf ' <small>{<code>%s</code>}</small>', Entity($eg);
+               my $pre = Entity($eg);
+               $pre =~ s<\N{ZERO WIDTH SPACE}>{</code><wbr/><code>}g;
+               $pre = " <small>{<code>$pre</code>}</small>";
                $title = $pre . $title;
        }
        return $title;