in reply to Can't call method "value" on an undefined value at X??

At first sight, this looks like a bug in WWW::Mechanize. In such cases you should check the documentation if this is mentioned somewhere, and then look at the bug tracker if it's reported.

If not, upgrade to the newest version of WWW::Mechanize, and check if the bug is still present. If yes, report it.

How should I do error handling on this?

You can inspect the returned HTML for the 'username' field, and if not present, try again. Yes, it's a workaround, not a fix.

Perl 6 - links to (nearly) everything that is Perl 6.
  • Comment on Re: Can't call method "value" on an undefined value at X??

Replies are listed 'Best First'.
Re^2: Can't call method "value" on an undefined value at X??
by Anonymous Monk on Aug 16, 2010 at 09:44 UTC
    Looks like what happens when there is no form and you try to call field ...