Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
use strict;
use YAML;
use WWW::Mechanize;
use Data::Dumper;
my $m= WWW::Mechanize->new(agent => 'WWW-Mechanize/1.34', cookie_jar => {});
$m->get( "" );
print "Got page... Logging in with [ $ENV{'LINODE_USERID'} : $ENV{'LINODE_PASSWD'} ]\n";
with_fields => {
auth_username => "$ENV{'LINODE_USERID'}",
auth_password => "$ENV{'LINODE_PASSWD'}"
if($m->content()=~m/Login incorrect or session timed-out/){ print "FAIL.\n"; }else{ print "WIN." };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.