Smolder::Mech
Test::WWW::Mechanize subclass with some Smolder specific helper methods
my $mech = Smolder::Mech->new(); $mech->login($user);
This routine will go to the login form, provide credentials and login. It receives the following named args, all required:
The text to use for the username field
The text to use for the password field. If none is given, it will use 'testing'.
$mech->login( username => $username, password => 's3cr3t', );
Logout the current user.
$mech->logout();
Extends get() from Test::WWW::Mechanize to also disconnect any open Database handles before making a request if we are using SQLite to avoid locking the database
get()
Extends submit() from Test::WWW::Mechanize to also disconnect any open Database handles before making a request if we are using SQLite to avoid locking the database
submit()
Extends request() from Test::WWW::Mechanize to also disconnect any open Database handles before making a request if we are using SQLite to avoid locking the database
request()
This method will look in the X-JSON HTTP header of the response, look through each message in the messages array and see if any of them match the given message.
X-JSON
messages
If given message is a scalar, the message must match exactly, else if it's a regex, then it will be matched against that.
To install Smolder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Smolder
CPAN shell
perl -MCPAN -e shell install Smolder
For more information on module installation, please visit the detailed CPAN module installation guide.