X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/302931daee1a9a4499ba441421b683c97bec36e3..43d481448a3819d58326be4587eadbedcf486e46:/perl.plp diff --git a/perl.plp b/perl.plp index 99863ff..02d0348 100644 --- a/perl.plp +++ b/perl.plp @@ -32,9 +32,13 @@ eval { use Time::Piece; use Time::Seconds; - my @versions = sort keys %{$info}; my $now = Time::Piece->new; - $now = $now->strptime($_, '%Y-%m-%d') for $get{at} // (); + if (my $ts = $get{at}) { + $now = $now->strptime($ts, '%Y-%m-%d'); + say "Compatibility details emulated for $ts."; + } + my $ts = $now->strftime('%F'); + my @versions = sort grep { $info->{$_}{release} le $ts } keys %{$info}; # perlpolicy: «We "officially" support the two most recent stable release # series. [...] we will attempt to fix critical issues» @@ -96,15 +100,18 @@ for my $vernum (reverse sort keys %{$info}) { if ($attr->{experimental}) { $title = sprintf '%s', $attr->{experimental}, $title; + $attr->{name} //= $attr->{experimental}; } if ($attr->{feature}) { my $prefix = sprintf 'feature', $attr->{feature}; $title = join ', ', $prefix, $title // (); + $attr->{name} //= $attr->{feature}; } - $desc .= sprintf ' (%s)', $title; + $desc .= sprintf ' (%s)', $title if $title; } - say sprintf '
%s
%s', $topic, $desc || '
'; + my $ref = defined $attr->{name} && sprintf ' id="%s"', $attr->{name}; + say sprintf '%s
%s', $ref, $topic, $desc || '
'; } say sprintf '
Unicode
v%s', $_ for $verrow->{unicode} || (); say '';