[Bps-public-commit] r11554 - SVN-PropDB/lib/Prophet/Replica

clkao at bestpractical.com clkao at bestpractical.com
Sat Apr 5 19:21:36 EDT 2008


Author: clkao
Date: Sat Apr  5 19:21:30 2008
New Revision: 11554

Modified:
   SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm

Log:
hm login

Modified: SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	Sat Apr  5 19:21:30 2008
@@ -43,23 +43,8 @@
     $self->hm_url("$uri");
 
     $self->hm( Jifyt RT::Client::REST->new( server => $server ) );
-    unless ($username) {
-
-        # XXX belongs to some CLI callback
-        use Term::ReadKey;
-        local $| = 1;
-        print "Username for $uri: ";
-        ReadMode 1;
-        $username = ReadLine 0;
-        chomp $username;
-        print "Password for $username @ $uri: ";
-        ReadMode 2;
-        $password = ReadLine 0;
-        chomp $password;
-        ReadMode 1;
-        print "\n";
-    }
 
+    ( $username, $password ) = $self->prompt_for_login( $uri, $username ) unless $password;
 
     $self->hm( Net::Jifty->new(site => $self->hm_url,
                         cookie_name => 'JIFTY_SID_HIVEMINDER',



More information about the Bps-public-commit mailing list