Test script:
#!/usr/bin/perl
use strict;
use warnings;
use Error qw(:try);
use RT::Client::REST;
my $rt = RT::Client::REST->new(server => '
http://localhost/rt3');
for (1 .. 5) {
print "TRY: $_\n";
try {
$rt->login(qw(username root password dude));
} catch Exception::Class::Base with {
my $e = shift;
print "Login failed: ", ref($e), ": ",
$e->message || $e->description, "\n";
};
}
try {
$rt->login(qw(username root password password));
} catch Exception::Class::Base with {
my $e = shift;
print "Login failed: ", ref($e), ": ",
$e->message || $e->description, "\n";
};