in reply to Re: Re: HTML::Form->Parse (Perl) not working under Fedora Core 1
in thread HTML::Form->Parse (Perl) not working under Fedora Core 1

I did some brute-force troubleshooting using trusty "print" statements to trace the problem back from my script to the Form.pm module to the TokeParser.pm module.

Specifically, HTML::Form->Parse, calls "get_tag" (in TokeParser.pm) which returns 'undef'. This occurs, because in "get_tag", the "$self->get_token" statement keeps returning tokens of type "T" until it runs out of tokens.

When I do the same debugging on the working RH8.0/perl5.8.0 version, I get a mix of tokens of types "T", "S", and "E" so that 'undef' is not returned and things work ok.

My limited perl skills did not allow me to trace this back further, but hopefully this will shed some light on the problem...

Any thoughts on what might be causing all of this?

  • Comment on Re: Re: Re: HTML::Form->Parse (Perl) not working under Fedora Core 1

Replies are listed 'Best First'.
Re: Re: Re: Re: HTML::Form->Parse (Perl) not working under Fedora Core 1
by Anonymous Monk on Dec 23, 2003 at 23:50 UTC
      ...and I was then able to *fix* the problem by REBUILDING the package 'perl-HTML-Parser-3.26-18.i386.rpm' under my new Fedora Core 1 system. Apparently, the Fedora people had simply taken the same package that was compiled under perl 5.8.0 and assumed it would be compatible when moved to 5.8.1

      PROBLEM SOLVED!!! I will now report this to Fedora bugzilla.

        Perl 5.8.1 should not be used any more, because of binary incompatibility with 5.8.0. It is the reason why 5.8.2 came out so soon. So, use either 5.8.0 or 5.8.2.

        I've been told that in ActivePerl/Win32, the feature responsible for the incompatibilty, had been disabled. So ActivePerl 5.8.1 is fine.

        Perl 5.8.2 and later will be binary compatible with 5.8.0, and largely also with 5.8.1.

Re: Re: Re: Re: HTML::Form->Parse (Perl) not working under Fedora Core 1
by Anonymous Monk on Dec 23, 2003 at 23:40 UTC
    OK... I have now *really* narrowed it down.

    Everything works ok, if I remove the following "optimization" line from the 'parse' subroutine in Forms.pm:

    eval { # optimization $p->report_tags(qw(form input textarea select optgroup option)); };
    For some reason though, this optimization works ok in RedHat8.0/perl5.8.0 but fails to work correctly in Fedora Core 1/perl5.8.1