Marc Tardif <[EMAIL PROTECTED]> writes:
> perl-5.6.1
> HTML::Parser-3.26
> Linux-2.4.16
>
> I'm using the following script to GET an http page:
>
> my $ua = LWP::UserAgent->new;
> $ua->agent($some_ua);
> my $req = HTTP::Request->new(GET => 'http://' . $some_site);
> my $res = $ua->request($req);
> my $code = $res->code
>
> When run without any debugging information, the returned
> code is 200. When run with ptkdb, code is 500. The reason
> for this is probably that ptkdb changes the context of
> expressions in order to gather debugging information.
> Therefore, in the ignore_tags function of
> HTML-Parser-3.26/Parser.xs, there should not be a croak if
> not in void context. My proposed patch is at the end of this
> message.
I will not apply this patch. I think a better approach is to fix the
buggy debugger. I don't know much about ptkdb, but I know
ActiveState's PDK debugger used to have a similar issue. We fixed
that one with a patch that looked like this:
@@ -654,7 +654,11 @@
}
else
{
- $i = &$sub;
+ if (defined wantarray) {
+ $i = &$sub;
+ } else {
+ &$sub; undef $i;
+ };
$single |= pop(@stack);
$i;
}
Something similar should be done for ptkdb.
Regards,
Gisle