Re: Let's play 'explain the error' in test suite for HTML::Tidy
by kcott (Archbishop) on Sep 20, 2025 at 00:07 UTC
|
G'day Intrepid,
"... aging but probably still-useful module ..."
Everything about that module indicates that it is very old.
I did a small amount of investigation.
-
HTML 3.2 was superseded by HTML 4.01 last century. HTML5 is current.
See W3C Standards - HTML publication history if you're interested in details.
-
HTML::Tidy was last updated eight years ago.
-
It's a wrapper around tidyp whose website, https://tidyp.com/, shows "This domain for sale!".
-
The Repository Description has: "HTML::Tidy is no longer being maintained.".
-
See the GitHub repo for Changes, Issues and so on.
I'm not a user of any HTML::Tidy* modules; however, from my reading
I'd suggest changing to HTML::Tidy5.
Other monks with more familiarity may have a better answer.
| [reply] [d/l] [select] |
|
|
Ken generously researched into HTML::Tidy and convincingly noted:
from my reading I'd suggest changing to HTML::Tidy5 ...Everything about that module indicates that it is very old ...
Yeah, I looked into HTML::Tidy5 after trying to build libtidyp from the
source at its github repo; I changed lanes because the C coding in one header file
was causing a fatal error in gcc/cpp. I got a solution for that, btw (on
SnarkOverflow), and was ultimately able to create a static libtidyp.a from the
object code. That's because other problems I encountered included having libtool
hang forever–no libtool, no .dll. That's why I stopped at having a static
library. But back to HTML::Tidy5: it's very different
from HTML::Tidy under the hood (or "bonnet" if you prefer
;-), in that it just invokes the stand-alone binary installed or locally built from
tidy-html5, whereas HTML::Tidy was a true Perl extension
using XS to interface with the C tidyp lib.
As for one obvious question some will have after reading about my adventure, to wit
"why go to all that trouble if you know there's a modern replacement?"
...I'm just stubborn like that. I get a certain way into
a problem and then I just don't want to let it go without some substantial
resolution.
— Soren
Sep 20, 2025 at 01:04 UTC
| [reply] |
Re: Let's play 'explain the error' in test suite for HTML::Tidy
by LanX (Saint) on Sep 19, 2025 at 23:40 UTC
|
I remember that you were running two Perl installations in parallel on the same system and the ENV pointed to both.
Is that still the case?
The test seems obvious, generate the minimal HTML when tidying an empty string.
And at least the doctype is missing.
Probably because of messed up configs.
I expect the doctype to depend on personal settings.
| [reply] |
|
|
Rolf wrote:
I remember that you were running two Perl installations in parallel on the same system and the ENV pointed to both.
Is that still the case?
That isn't exactly pertinent to the question I asked here, Rolf, but I'll
overlook that. I've got my ENV tightly controlled now,
with only CygwinPerl or StrawberryPerl, and all the tools and ENV settings associated with each,
invoked at any one time. I'm miles ahead of where I was back then (a few weeks ago).
I'm using berrybrew (for now) with StrawberryPerl(s) and I even went so far as to brutally
do rm -rf C:/Perl to my old StrawberryPerl (the one I wrote about destroying
by trying to install an update .msi over it).
I still use the vendor supplied (system) Perl in Cygwin. Several of our fellow
monks have noted that they ignore that Perl, and only use Perls they've built
on-site. I am not sure where the disdain for the Cygwin-supplied Perl comes from.
Maybe some of these monks will read this and write about 'why the strong
preference.'
One more thing that might be a bit controversial. I run my Strawberry (Windows)
operations in a bash shell. I just cannot abide the CMD /
PS Terminal even if they did add CTRL-C and CTRL-V to it. I hate it. What I do is possible by having
/usr/bin at the very end of my Cygwin bash $PATH. It's working very well,
whether using cpan clients like cpanm or cpan or cpanp, or dropping into a new
shell session to run perl Makefile.PL and trace everything that's
happening in the build of a non-trivial module (there's almost never anything broken,
I just like to watch the scrolling text, it's relaxing ;-)
Sep 21, 2025 at 21:04 UTC
A just machine to make big decisions
Programmed by fellows (and gals) with compassion and vision
We'll be clean when their work is done
We'll be eternally free yes, and eternally young
Donald Fagen —> I.G.Y.
(Slightly modified for inclusiveness)
| [reply] [d/l] [select] |
Re: Let's play 'explain the error' in test suite for HTML::Tidy
by ysth (Canon) on Sep 21, 2025 at 20:06 UTC
|
I'm assuming the test first failed when run from the harness? Normally I'd use prove or prove --blib to manually run a single test. I don't visually see why it is failing, do you (given the raw actual output)? | [reply] |
|
|
Sorry about the delay in responding. Yitzchak wrote:
I'm assuming the test first failed when run from the harness?
Your assumption is correct.
I don't visually see why it is failing, do you (given the raw actual output)?
That's right, I cannot see where the failure is. I guess it's trying to
match a multi-line pattern (the second chunk of text) against the first chunk. The
line below contains the only regexp metachars:
# <meta name="generator" content="[^"]+">
It's not a very important failure, I think, but after the amount of work I put into
building a libtidy.a to link in the module build, I wanted a perfect suite of
tests.
— Soren
Sep 23, 2025 at 01:21 UTC
| [reply] [d/l] |
Re: Let's play 'explain the error' in test suite for HTML::Tidy
by Anonymous Monk on Sep 20, 2025 at 23:43 UTC
|
| [reply] |
|
|
| [reply] |
Re: Let's play 'explain the error' in test suite for HTML::Tidy
by bliako (Abbot) on Sep 22, 2025 at 12:01 UTC
|
It runs OK on my linux. OT: I know you are Intrepid but using windows for anything is plain self-harm. If you have customers that insist on using windows, ditch them, they will drain you otherwise.
| [reply] |
|
|
Heh, bliako, LOL. Now don't hold in your strong feelings, that's not good for you ;-).
I am a huge fan of Linux, imho the accumulated effort that's gone into Gnu/Linux has saved the world. Most of my computers run LMDE or MX Linux or vanilla Debian.
I'm an enthusiast rather than being in the business, so I can do what interests me without demands. I know a lot about the foibles of Windows but I have to insert here the humble opinion that Windows has gotten better, and I believe that is in no small part because Microsoft has responded to the pressure (in the mind-share marketplace) that Linux has put on it.
I'm going to keep trying out different things on Windows, and when I start getting burned out with it, I'll run to the other room and take refuge in my beloved Linux systems.
— Soren (Intrepid)
Sep 22, 2025 at 17:14 UTC
| [reply] |
|
|
Now don't hold in your strong feelings, that's not good for you ;-).
hehe, i know! it's because i am in a bind because it's not customers who torment me but friends who i can not dump. They are stack with this asbestos of an OS because their accounting software only works there. They are like cows being milked but they get whipped as a bonus for the fat paychecks they pay the authors, modern day kapos to keep the cows in the shed. anyway, enjoy.
Microsoft has responded to the pressure (in the mind-share marketplace) that Linux has put on it
hmm, i think linux fell in the cinderella trap by doing all the heavy lifting (for free) for the servers (41% share vs 27%) and being invisible on the desktop where you can really influence hearts+minds (4% vs 71%). source.
| [reply] [d/l] [select] |