[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8 |
Date: |
Mon, 14 Nov 2022 13:38:59 -0500 (EST) |
Follow-up Comment #22, bug #62648 (project octave):
I have attached a patch which is slightly more attuned to the Perl way of
doing things. Specifically, it is almost never necessary to directly check
for EOF. Per the documentation for eof() in Perl (try 'perldoc -f eof')
Practical hint: you almost never need to use "eof" in Perl,
because the input operators typically return "undef" when they
run out of data or encounter an error.
This expression
while (not (eof ($HTML)) and ( ($_ = <$HTML>) !~ /^<ul
class="(no-bullet|toc-numbered-mark)">/ ) ) {;}
can be simplified to
while (defined ($_ = <$HTML>) and ! /^<ul
class="(?:no-bullet|toc-numbered-mark)">/) {;}
where I skip eof() but use the short-circuit operator "and". I also used the
non-capturing regular expression '(?:A|B)' rather than '(A|B)'. Perl is so
fast it hardly makes a difference, but we aren't using the captured data from
the regular expression so we might as well tell Perl it can discard it.
(file #53955)
_______________________________________________________
Additional Item Attachment:
File name: bug62648.cset Size:1 KB
<https://file.savannah.gnu.org/file/bug62648.cset?file_id=53955>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62648>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, (continued)
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Arun Giridhar, 2022/11/11
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Arun Giridhar, 2022/11/11
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Markus Mützel, 2022/11/11
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Arun Giridhar, 2022/11/11
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Sam James, 2022/11/14
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Arun Giridhar, 2022/11/14
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Arun Giridhar, 2022/11/14
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Markus Mützel, 2022/11/14
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Arun Giridhar, 2022/11/14
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Markus Mützel, 2022/11/14
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8,
Rik <=
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Sam James, 2022/11/14
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Markus Mützel, 2022/11/15
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Markus Mützel, 2022/11/15
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Markus Mützel, 2022/11/15
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Sam James, 2022/11/15
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Rik, 2022/11/15
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Arun Giridhar, 2022/11/15
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Rik, 2022/11/15
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Markus Mützel, 2022/11/15
- [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8, Markus Mützel, 2022/11/15