From: Mischa POSLAWSKY Date: Tue, 30 May 2023 17:29:30 +0000 (+0200) Subject: perl: versionless "dropped" attribute to hide X-Git-Tag: v1.14~12 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/5d0bed0b1a591ba0f12526961a5d857d36df0267 perl: versionless "dropped" attribute to hide --- diff --git a/perl.inc.pl b/perl.inc.pl index 0b6ab2c..e1ed0e6 100644 --- a/perl.inc.pl +++ b/perl.inc.pl @@ -1,4 +1,5 @@ use utf8; +use strict; +{ v5.004 => { @@ -11,7 +12,7 @@ use utf8; v5.005 => { new => [ - ['lock', 'obsolete Thread implementation, including a keyword to place advisory locks on shared variables', {experimental => 0, stable => 0, removed => v5.10}], + ['lock', 'obsolete Thread implementation, including a keyword to place advisory locks on shared variables', {experimental => 0, stable => 0, dropped => v5.10}], ['B::…', 'backend hooks'], ['qr//' => 'overhauled regular expression engine: precompile operator, lookahead/behind, code, conditions, localised flags'], ['… foreach' => 'for(each) as statement modifier, with large ranges optimised as counting loops'], @@ -174,7 +175,7 @@ use utf8; ], modules => [ [JSON => 'interface with data in JavaScript Object Notation', 'decode_json <>'], - ['HTTP::Tiny' => 'minimal HTTP/1.1 client without LWP::UserAgent overhead'], + ['HTTP::Tiny' => 'minimal HTTP/1.1 client without LWP::UserAgent overhead', {dropped => 0}], # Unicode::Collate::Locale ], release => '2011-05-14', diff --git a/perl.plp b/perl.plp index 49694fc..1f5cfe7 100644 --- a/perl.plp +++ b/perl.plp @@ -110,9 +110,9 @@ sub featattrs ($attr) { if (defined $attr->{experimental}) { $title = 'experimental'; } - if ($attr->{dropped}) { + if (defined $attr->{dropped}) { next unless exists $get{v}; - $title = sprintf 'removed in %vd', $attr->{dropped}; + $title = sprintf 'removed in %vd', $_ for $attr->{dropped} || (); } elsif ($attr->{stable}) { $title .= sprintf ' until %vd', $attr->{stable};