use SVN::Client; my( $user, $pass ) = qw[ already gotten ]; my $ctx = new SVN::Client( auth => [SVN::Client::get_simple_provider(), SVN::Client::get_simple_prompt_provider(\&simple_prompt, +2), SVN::Client::get_username_provider()] ); sub simple_prompt { my $cred = shift; my $realm = shift; my $default_username = shift; my $may_save = shift; my $pool = shift; print "Enter authentication info for realm: $realm\n"; print "Username: "; my $username = <>; chomp($username); $cred->username($username); print "Password: "; my $password = <>; chomp($password); $cred->password($password); }
use SVN::Client; my $ctx = new SVN::Client( auth => [ SVN::Client::get_simple_provider(), SVN::Client::get_simple_prompt_provider( sub { my $cred = shift; $cred->username($user); $cred->password($pass); }, 2 ), SVN::Client::get_username_provider() ] );
In reply to Re: SVN::Client - Passing it a Username and Password
by Anonymous Monk
in thread SVN::Client - Passing it a Username and Password
by mdt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |