[Bps-public-commit] r18276 - in Net-Google-Code/branches/write: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat Feb 7 04:46:55 EST 2009


Author: sunnavy
Date: Sat Feb  7 04:46:55 2009
New Revision: 18276

Modified:
   Net-Google-Code/branches/write/   (props changed)
   Net-Google-Code/branches/write/lib/Net/Google/Code/Role/Authentication.pm

Log:
 r19681 at sunnavys-mb:  sunnavy | 2009-02-07 17:42:32 +0800
 follow the login link if the current page has one


Modified: Net-Google-Code/branches/write/lib/Net/Google/Code/Role/Authentication.pm
==============================================================================
--- Net-Google-Code/branches/write/lib/Net/Google/Code/Role/Authentication.pm	(original)
+++ Net-Google-Code/branches/write/lib/Net/Google/Code/Role/Authentication.pm	Sat Feb  7 04:46:55 2009
@@ -19,7 +19,10 @@
     my $self = shift;
     $self->ask_password unless $self->has_password;
 
-    $self->mech->get('https://www.google.com/accounts/Login');
+    $self->mech->follow_link(
+        url_regex => qr!^https?://www\.google\.com/accounts/Login! )
+      || $self->mech->get('https://www.google.com/accounts/Login');
+
     $self->mech->submit_form(
         with_fields => {
             Email  => $self->email,



More information about the Bps-public-commit mailing list