Thread (8 messages) flat view 8 messages, 3 authors, 2022-09-26

Re: [PATCH v2] cmd-list.perl: fix identifying man sections

From: Martin Ågren <hidden>
Date: 2022-09-23 11:43:00

On Fri, 23 Sept 2022 at 10:53, Ævar Arnfjörð Bjarmason [off-list ref] wrote:
Thanks for the quick turn-around, this looks good to me in this form.
Thanks for reviewing.
Now, having written and looked at this with fresh eyes this would be an
even better & more logical thing to do:
                open I, '<', "$name.txt" or die "No such file $name.txt";
                while (<I>) {
        -               if (/^(?:git|scalar)[a-z0-9-]*\(([0-9])\)$/) {
        +               if (/^\Q$name\E\(([0-9])\)$/) {
                                $mansection = $1;
                                next;
                        }
Right, we know what we want there, so this does look reasonable.
Anyway, this is more than good enough for now, thanks! There's also much
bigger issues with the script, and we can leave that all aside from now
(e.g. if it dies the Makefile doesn't report an error, ouch!).
Martin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help