[Bps-public-commit] r19691 - in Net-Google-Code/trunk: lib/Net/Google/Code/Role

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri May 15 09:33:21 EDT 2009


Author: sunnavy
Date: Fri May 15 09:33:19 2009
New Revision: 19691

Modified:
   Net-Google-Code/trunk/Makefile.PL
   Net-Google-Code/trunk/lib/Net/Google/Code/Role/Authentication.pm

Log:
no ask_password stuff: that is bad for library, thanks obra

Modified: Net-Google-Code/trunk/Makefile.PL
==============================================================================
--- Net-Google-Code/trunk/Makefile.PL	(original)
+++ Net-Google-Code/trunk/Makefile.PL	Fri May 15 09:33:19 2009
@@ -12,7 +12,6 @@
 requires 'WWW::Mechanize';
 requires 'HTML::TreeBuilder';
 requires 'Params::Validate';
-requires 'Term::ReadPassword';
 
 recursive_author_tests('xt/');
 

Modified: Net-Google-Code/trunk/lib/Net/Google/Code/Role/Authentication.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/Role/Authentication.pm	(original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/Role/Authentication.pm	Fri May 15 09:33:19 2009
@@ -16,7 +16,7 @@
 sub sign_in {
     my $self = shift;
     return 1 if $self->signed_in;
-    $self->ask_password unless $self->password && length $self->password;
+    die "need password" unless $self->password;
 
     $self->mech->get('https://www.google.com/accounts/Login');
 
@@ -43,15 +43,6 @@
     return 1;
 }
 
-sub ask_password {
-    my $self = shift;
-    while ( !defined $self->password or $self->password eq '' ) {
-        require Term::ReadPassword;
-        my $pass = Term::ReadPassword::read_password("password: ");
-        $self->password($pass);
-    }
-}
-
 sub signed_in {
     my $self = shift;
 
@@ -103,10 +94,6 @@
 
 return 1 if already signed in, return undef elsewise.
 
-=head2 ask_password
-
-ask user to input password
-
 =head1 AUTHOR
 
 sunnavy  C<< <sunnavy at bestpractical.com> >>



More information about the Bps-public-commit mailing list