in reply to Question on WxString (WxPerl) and WWW::Mechanize

I have used WxPerl a lot, and there is no difference between WxString and an ordinary perl string. So that is not the issue.

If you want to make sure of this, put a check: right after getvalue, add

die unless $title eq 'whatever'; die unless $comentfile eq 'file.htm';

Replies are listed 'Best First'.
Re^2: Question on WxString (WxPerl) and WWW::Mechanize
by Ash Rai (Acolyte) on Sep 11, 2007 at 15:03 UTC
    Thanks for replying!
    Your snippet was useful. I did add the line and the program doesn't terminate but it still don't work. Would you happen to know any quirks of WWW::Mechanize module, like whether its subroutines cannot be passed with certain kind of string??
    This is weird, when I add  die unless $title eq 'whatever'; the processing doesn't terminate and the program doesn't work, but when I make explicit assignment after your line as:
    die unless $title eq 'whatever'; $title = 'whatever';
    It works. So... o_0
    I even added following lines:
    if ((defined($title))&&($title ne "")) { print "\nTitle filled with ... $title"; $mech->field(title => $title); }

    The output says: Title filled with ... whatever
    and then.. LWP::UserAgent::request: Simple response: Internal Server Error