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==