Hi,
I'm trying to build Gtk2-1.22 on Win32 with perl-5.8.0.
It builds ok, but nearly all of the tests fail because of a syntax error in TestHelper.pm, which is one of the files that ship with the Gtk2 source. Surprisingly, (to me at least), identical syntax is considered fine in both perl-5.10.0 and perl-5.12.0.
The actual error is:
C:\build\Gtk2-1.222>perl -Mblib -c blib\lib/Gtk2/TestHelper.pm syntax error at blib\lib/Gtk2/TestHelper.pm line 98, near "ok " syntax error at blib\lib/Gtk2/TestHelper.pm line 100, near "}" blib\lib/Gtk2/TestHelper.pm had compilation errors.
And here's the relevant section of the TestHelper.pm:
sub ok_idle ($;$) { 88: my ($testsub, $test_name) = @_; 89: run_main { 90: # 0 Test::More::ok 91: # 1 this block's ok() call 92: # 2 idle callback in run_main 93: # 3 Gtk2::main call in run_main 94: # 4 Gtk2::main call in run_main (again) 95: # 5 ok_idle 96: # 6 the caller we want to print 97: local $Test::Builder::Level = 6; 98: ok ($testsub->(), $test_name); 99: } 100: }
Does anyone know why perl-5.8 sees that as syntactically erroneous ? ... and what do do about it ?

I wondered if it might be something to do with the antiquated version of Test::Simple/Test::Builder I was running, so I updated to 0.96, and updated ExtUtils::MakeMaker to 6.57. Both of those modules passed all tests while building, but the syntax error persists.

Cheers,
Rob

In reply to syntax error - perl-5.8 only by syphilis

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.