Leser: 16
1 2 3 4 5 6 7 8
sub login_data { return [ { key => 'host', prompt => "Host", no_echo => 0 }, { key => 'port', prompt => "Port", no_echo => 0 }, { key => 'user', prompt => "User", no_echo => 0 }, { key => 'pass', prompt => "Password", no_echo => 1 }, ]; }
1 2 3 4 5
sub connect_attributes { return [ { key => 'mysql_enable_utf8', default => 1, values => [ 0, 1 ] }, ]; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
$connect_parameter = { attributes => { mysql_enable_utf8 => 1, }, login_mode => { # ask use environment variable don't ask host => 2, # 0 1 2 port => 2, # 0 1 2 user => 1, # 0 1 2 pass => 1, # 0 1 2 }, credential => { host => undef, port => undef, user => "my_name", pass => undef, }, keep_secret = { host => 0, port => 0, user => 0, pass => 1, }, };