Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 2106
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: barret [...] edu.21cn.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: "Barret" <barret [...] edu.21cn.com>
To: bug-WWW-Mechanize [...] rt.cpan.org <bug-WWW-Mechanize [...] rt.cpan.org>
Subject: WWW-Mechanize 0.36 core dump
Date: Fri, 14 Feb 2003 15:42:6 +0800
I use Perl 5.6.1 (RH7.2) and WWW-Mechanize 0.36. Bug: Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.6.1/WWW/Mechanize.pm line 295 (#1) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program. core dump. That's my script. #!/usr/bin/perl -w use diagnostics; use WWW::Mechanize; use URI::Escape; my $mozilla = WWW::Mechanize->new (); $mozilla->get ("http://5iqz.51.net/forum/login.php"); print $mozilla->links (); $mozilla->form_name(""); $mozilla->field ("username", "gagiel"); $mozilla->field ("password", "qazwsx"); $mozilla->submit (); $svranswer = $mozilla->res (); print $svranswer->code; print $svranswer->content; print "-" x 80; print "\n"; $title = "TESTbyREALR0b0t."; $msg = "FT"; $mozilla->get ("http://5iqz.51.net/forum/posting.php?mode=newtop&f=10"); $mozilla->form ("post"); $mozilla->field ("subject", $title); $mozilla->field ("message", $msg); $mozilla->submit (); $svranswer = $mozilla->res (); print $svranswer->code; print $svranswer->content; ==end==
From: "Barret" <barret [...] edu.21cn.com>
To: bug-WWW-Mechanize [...] rt.cpan.org <bug-WWW-Mechanize [...] rt.cpan.org>
Subject: Re: [cpan #2106] AutoReply: WWW-Mechanize 0.36 core dump
Date: Wed, 19 Feb 2003 19:36:17 +0800
RT-Send-Cc:
Hi, WWW-Mechanize How about the bug now? - 2003-02-14 02:41:00 you wrote - Show quoted text
> Greetings, > This message has been automatically generated in response to your bug report about WWW-Mechanize, a summary of which appears below. > >There is no need to reply to this message right now. Your bug in WWW-Mechanize has been assigned an ID of [cpan #2106]. Please include the string: > > [cpan #2106] > >in the subject line of all future correspondence about this issue. To do so, >you may reply to this message. > > Thank you, > bug-WWW-Mechanize@rt.cpan.org > >------------------------------------------------------------------------- >I use Perl 5.6.1 (RH7.2) and WWW-Mechanize 0.36. >Bug: > >Use of uninitialized value in string eq at > /usr/lib/perl5/site_perl/5.6.1/WWW/Mechanize.pm line 295 (#1) > (W uninitialized) An undefined value was used as if it were already > defined. It was interpreted as a "" or a 0, but maybe it was a mistake. > To suppress this warning assign a defined value to your variables. > > To help you figure out what was undefined, perl tells you what operation > you used the undefined value in. Note, however, that perl optimizes your > program and the operation displayed in the warning may not necessarily > appear literally in your program. For example, "that $foo" is > usually optimized into "that " . $foo, and the warning will refer to > the concatenation (.) operator, even though there is no . in your > program. > >core dump. > >That's my script. > >#!/usr/bin/perl -w > >use diagnostics; >use WWW::Mechanize; >use URI::Escape; > >my $mozilla = WWW::Mechanize->new (); > >$mozilla->get ("http://5iqz.51.net/forum/login.php"); > >print $mozilla->links (); >$mozilla->form_name(""); >$mozilla->field ("username", "gagiel"); >$mozilla->field ("password", "qazwsx"); >$mozilla->submit (); > >$svranswer = $mozilla->res (); >print $svranswer->code; >print $svranswer->content; > >print "-" x 80; >print "\n"; > >$title = "TESTbyREALR0b0t."; >$msg = "FT"; > >$mozilla->get ("http://5iqz.51.net/forum/posting.php?mode=newtop&f=10"); >$mozilla->form ("post"); >$mozilla->field ("subject", $title); >$mozilla->field ("message", $msg); >$mozilla->submit (); > >$svranswer = $mozilla->res (); >print $svranswer->code; >print $svranswer->content; >==end==
------ Best Regards,         Barret         barret@edu.21cn.com
[barret@edu.21cn.com - Wed Feb 19 06:35:30 2003]: Show quoted text
> How about the bug now?
I didn't get a core dump, but it does seem that you shouldn't be calling form_name(""), but should be saying form_number(0) instead.
I'm released 0.37 today. Can you please try your code with it, and report back? Thanks, Andy
0.38 has just been released. How about trying your bug with it now? If I don't hear baack, I'll assume all is OK and close out the ticket.