Both Test::More and WWW::Chat export a routine called fail(). This
makes it rather hard to write tests for web stuff using both these
modules.
Since WWW::Chat's fail() is only used internally, could I possibly
request that it be changed to not export, and/or rename it _fail, or
whatever. Anything.
Also, there's some weirdness with webchatpp's generated code if your
WWW::Chat script was inside subroutines (or presumably other blocks).
Here's a real life example:
#!/usr/bin/perl -w
use strict;
use Inline 'WebChat';
use Test::More 'no_plan';
ok(manager(), "Manager is running and requires login");
ok(manager_admin_login(), "Can login to manager as admin");
__END__
__WebChat__
sub manager {
GET http://192.168.1.1:980/
EXPECT 401
}
sub manager_admin_login {
$ua->credentials(
"192.168.1.1:980",
"March Networks SME Server manager",
"admin",
$password
);
GET http://192.168.1.1:980/
EXPECT OK && /March Networks Server manager/
}
If you run that through webchatpp you'll see that there are evals that
cross over between subs, like this:
sub foo {
eval {
blah blah
}
sub bar {
blah blah
more blah
} # end eval here, WRONG
}
It would be nice if we could get this to work ;) But as a workaround, I
can live with one sub per script for now, I guess :-/
K.