From 15c9f6545d948feb2568d8cd26aac0c8ae489d92 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 13 Apr 2026 18:04:31 +0900 Subject: [PATCH] internal/rosa/perl: populate anitya identifiers These are also tracked by Anitya. Signed-off-by: Ophestra --- internal/rosa/perl.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/internal/rosa/perl.go b/internal/rosa/perl.go index 622171fa..acfebfa1 100644 --- a/internal/rosa/perl.go +++ b/internal/rosa/perl.go @@ -2,6 +2,7 @@ package rosa import ( "slices" + "strings" "hakurei.app/internal/pkg" ) @@ -159,6 +160,8 @@ func init() { Name: "perl-Locale::gettext", Description: "message handling functions", Website: "https://metacpan.org/release/Locale-gettext", + + ID: 7523, } } @@ -181,6 +184,8 @@ func init() { Name: "perl-Pod::Parser", Description: "base class for creating POD filters and translators", Website: "https://metacpan.org/release/Pod-Parser", + + ID: 3244, } } @@ -203,6 +208,22 @@ func init() { Name: "perl-SGMLS", Description: "class for postprocessing the output from the sgmls and nsgmls parsers", Website: "https://metacpan.org/release/RAAB/SGMLSpm-1.1", + + ID: 389576, + + latest: func(v *Versions) string { + for _, s := range v.Stable { + _, m, ok := strings.Cut(s, ".") + if !ok { + continue + } + if len(m) > 1 && m[0] == '0' { + continue + } + return s + } + return v.Latest + }, } } @@ -225,6 +246,8 @@ func init() { Name: "perl-Term::ReadKey", Description: "a perl module for simple terminal control", Website: "https://metacpan.org/release/TermReadKey", + + ID: 3372, } } @@ -247,6 +270,8 @@ func init() { Name: "perl-Text::CharWidth", Description: "get number of occupied columns of a string on terminal", Website: "https://metacpan.org/release/Text-CharWidth", + + ID: 14380, } } @@ -275,6 +300,8 @@ func init() { Dependencies: P{ PerlTextCharWidth, }, + + ID: 14385, } } @@ -297,6 +324,8 @@ func init() { Name: "perl-MIME::Charset", Description: "Charset Information for MIME", Website: "https://metacpan.org/release/MIME-Charset", + + ID: 3070, } } @@ -325,6 +354,8 @@ func init() { Dependencies: P{ PerlMIMECharset, }, + + ID: 6033, } } @@ -347,5 +378,7 @@ func init() { Name: "perl-YAML::Tiny", Description: "read/write YAML files with as little code as possible", Website: "https://metacpan.org/release/YAML-Tiny", + + ID: 3549, } }