perl: versionless "dropped" attribute to hide
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 30 May 2023 17:29:30 +0000 (19:29 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 30 May 2023 17:47:59 +0000 (19:47 +0200)
perl.inc.pl
perl.plp

index 0b6ab2cb27d86e291e7af60b57bf754e5d2a6630..e1ed0e6d23268278f4564dad685180f3063c6890 100644 (file)
@@ -1,4 +1,5 @@
 use utf8;
+use strict;
 
 +{
        v5.004 => {
@@ -11,7 +12,7 @@ use utf8;
 
        v5.005 => {
                new => [
-                       ['<code>lock</code>', 'obsolete <code>Thread</code> implementation, including a keyword to place advisory locks on shared variables', {experimental => 0, stable => 0, removed => v5.10}],
+                       ['<code>lock</code>', 'obsolete <code>Thread</code> implementation, including a keyword to place advisory locks on shared variables', {experimental => 0, stable => 0, dropped => v5.10}],
                        ['<code>B::…</code>', 'backend hooks'],
                        ['<code>qr//</code>' => 'overhauled regular expression engine: precompile operator, lookahead/behind, code, conditions, localised flags'],
                        ['<code>… foreach</code>' => '<code>for(each)</code> 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 <code>LWP::UserAgent</code> overhead'],
+                       ['HTTP::Tiny' => 'minimal HTTP/1.1 client without <code>LWP::UserAgent</code> overhead', {dropped => 0}],
                        # Unicode::Collate::Locale
                ],
                release => '2011-05-14',
index 49694fc67abbb87d34d4b223f1f27111976c00f2..1f5cfe79fa41360d75907ded5cb2003423d7807b 100644 (file)
--- 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};