From: Mischa POSLAWSKY Date: Thu, 16 Feb 2023 14:18:54 +0000 (+0100) Subject: perl: pretend compatibility for given ?at date X-Git-Tag: v1.14~26 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/aaab5bb809386fe59113c7cff1341cbf532fe4e7 perl: pretend compatibility for given ?at date --- diff --git a/perl.plp b/perl.plp index 99863ff..c36f5e8 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»