Hello oh wise a great monks. I have spent a day on this without a solution so I am turning to you for help. I am trying to install HTML::Tidy on a Windows 10 server and am stuck! I know that tidyp is need so I'm trying to install Alien::Tidyp first as it searches the box for tidyp and if it's not there should install it. That's where I get this error:/

-c src/buffio.c -o src/buffio.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/clean.c -o src/clean.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/config.c -o src/config.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/entities.c -o src/entities.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/fileio.c -o src/fileio.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/istack.c -o src/istack.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/lexer.c -o src/lexer.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/localize.c -o src/localize.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/mappedio.c -o src/mappedio.o In file included from src/mappedio.c:100: src/streamio.h:204:15: error: expected identifier or '(' before numeri +c constant #define CR 0xD ^~~ gmake: *** [C:\STRAWB~1\cpan\build\Alien-Tidyp-v1.4.7-7\patches\Makefi +le.mingw:45: src/mappedio.o] Error 1 ###ERROR### [512] during make ... at inc/My/Builder/Windows.pm line 3 +9. KMX/Alien-Tidyp-v1.4.7.tar.gz C:\Strawberry\perl\bin\perl.exe ./Build -- NOT OK Stopping: 'install' failed for 'Alien::Tidyp'. Failed during this command: KMX/Alien-Tidyp-v1.4.7.tar.gz : make NO

Please note I'm trying to install using CPAN. I even installed cpanm to try and get the pms thinking it might do something different. So I'm stuck my script uses Tidy::HTML but I can't get tidyp on the box so I can't install HTML::Tidy. I'm not doing anything too fancy with Tidy, here's my code:

my $contents_of_file = 1; @files = glob "$call_dir/*.html"; printf "Got %d files\n", scalar @files; my $tidy = HTML::Tidy->new( { tidy_mark => 1, #output_xhtml => 1, # yes #output_xhtml => 1, # yes add_xml_decl => 1, # no wrap => 76, error_file => 'errs.txt', char_encoding => 'utf8', indent_cdata => 1, clean => 1, fix_bad_comments =>1 }); for my $file (@files){ $$temp_var = read_file( $file ); if ( $$temp_var =~ m|^URL.*| ){ next } # this + is empty file for error message in output. my $tres = $tidy->parse( $file, $$temp_var ); print "Tidy file: $file, result is $tres\n"; open OUT,'>',$file or die "$!"; print OUT $tidy->clean( $file, $$temp_var ); print "cleaning " . $file. "\n"; close OUT; } $temp_var = undef;

I would be open to using another module that I could install that could do this. Up till 3AM last night trying to find a solution, not looking to go there again tonight

Thanks in advance for any help/insight!

The tired nub

PS - I also did take the time to install Cygwin thinking I could d/l the source and compile by I've got no clue what I'm doing there.


In reply to HTML::Tidy - Tidyp install issues by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.