–¼‘O

Term::ReadPasswd - ƒ†�[ƒU�[‚ɃpƒXƒ��[ƒh‚ð�q‚Ë‚é (Win32 —p)

ŠT—v

use Term::ReadPasswd;
while (1) {
  my $password = read_passwd('password: ');
  redo unless defined $password;
  if ($password eq 'flubber') {
    print "Access granted.\n";
    last;
  } else {
    print "Access denied.\n";
    redo;
  }
}

�à–¾

‚±‚̃‚ƒWƒ…�[ƒ‹‚Í�ATerm::ReadPassword ‚Æ“¯‚¶‚悤‚É�Aƒ†�[ƒU�[‚ɑ΂µ‚Ä ƒpƒXƒ��[ƒh‚ð�q‚Ë‚Ü‚·�B

ƒ†�[ƒU�[‚ɑ΂µ‚ăpƒXƒ��[ƒh‚Ì“ü—Í‚ð‹�‚ß‚é‚É‚Í�ATerm::ReadPassword ‚ð Žg‚¤‚Ì‚ª‚æ‚¢•û–@‚Å‚·‚ª�ATerm::ReadPassword ‚Í Windows —p‚Ì ActivePerl ‚Å‚Í“®‚©‚È‚¢‚Æ‚¢‚¤–â‘肪‚ ‚邽‚ß�A‚»‚ê‚ð‰ðŒˆ‚·‚邽‚ß‚É Term::ReadPasswd ‚ð�‘‚«‚Ü‚µ‚½�B

‚±‚̃‚ƒWƒ…�[ƒ‹‚Í�AWindows ‚Æ Unix ‚Ì‚Ç‚¿‚ç‚Å‚àŽg‚¦‚Ü‚·�B Windows ‚ÅŽg‚¤‚É‚Í�AWin32::* ‚̃‚ƒWƒ…�[ƒ‹‚ª•K—v‚Å‚·�B Unix ‚ÅŽg‚¤‚Æ‚«‚Í�A ‚±‚̃‚ƒWƒ…�[ƒ‹‚Í Term::ReadPassword ‚ɑ΂·‚郉ƒbƒp�[‚Æ‚µ‚Ä“®�삵‚Ü‚·�B

read_passwd ŠÖ�”‚Í�ATerm::ReadPassword::read_password ŠÖ�”‚Æ‚Ù‚Æ‚ñ‚Ç “¯‚¶‚悤‚É“®�삵‚Ü‚·�B

�Å�‰‚Æ‚Q”Ԗڂ̃pƒ‰ƒ��[ƒ^‚Í�Aread_password ‚Æ‘S‚­“¯‚¶‚Å‚·�B�Å�‰‚Ì ƒpƒ‰ƒ��[ƒ^‚Í�Aƒvƒ�ƒ“ƒvƒg‚Æ‚µ‚Ä•\Ž¦‚·‚镶Žš—ñ‚ðŽw’肵�A‚Q”Ô–Ú‚Ì ƒpƒ‰ƒ��[ƒ^‚Í�Aƒ^ƒCƒ€ƒAƒEƒg’l‚ð•b’PˆÊ‚ÅŽw’肵‚Ü‚·�B

‚R”Ԗڂ̃pƒ‰ƒ��[ƒ^‚Í�Aread_password ‚Æ‚Í�­�XˆÙ‚È‚Á‚Ä‚¢‚Ü‚·�B

‚R”Ԗڂ̃pƒ‰ƒ��[ƒ^‚ª 0 ‚Ì‚Æ‚«‚Í�ACtrl+C ‚Í‘¼‚Ì•¶Žš‚Æ‘S‚­“¯‚¶‚悤‚É�A “ü—̓oƒbƒtƒ@‚ÉŠi”[‚³‚ê‚Ü‚·�B‚±‚ê‚Í read_password ‚Ì‚R”Ԗڂ̃pƒ‰ƒ��[ƒ^‚É false ‚ðŽw’肵‚½‚Æ‚«‚Ì“®�ì‚Æ“¯‚¶‚Å‚·�B

‚R”Ԗڂ̃pƒ‰ƒ��[ƒ^‚ª 1 ‚Ì‚Æ‚«‚Í�ACtrl+C ‚Ü‚½‚Í Esc ‚ª“ü—Í‚³‚ê‚é‚Æ ƒpƒXƒ��[ƒh‚Ì“ü—Í‚ð�I—¹‚µ‚Ü‚·�Bread_password ‚Ì‚R”Ԗڂ̃pƒ‰ƒ��[ƒ^‚É true ‚ðŽw’肵‚½‚Æ‚«‚Ì“®�ì‚ÆŽ—‚Ä‚¢‚Ü‚·‚ª�AEsc ‚Å‚à“ü—Í‚ð�I—¹‚Å‚«‚é“_‚ª ˆÙ‚È‚Á‚Ä‚¢‚Ü‚·�B

‚R”Ԗڂ̃pƒ‰ƒ��[ƒ^‚ª 2 ‚Ì‚Æ‚«‚Í�AEsc ‚ª“ü—Í‚³‚ê‚é‚ƃpƒXƒ��[ƒh‚Ì“ü—Í‚ð �I—¹‚µ‚Ü‚·�BCtrl+C ‚ª“ü—Í‚³‚ꂽ�ê�‡‚Í�A‚¨‚»‚ç‚­ƒvƒ�ƒOƒ‰ƒ€‚ª’†’f ‚³‚ê‚Ü‚·�B

read_password ‚Æ“¯—l‚É�ACtrl+U ‚ª“ü—Í‚³‚ê‚é‚Æ�A“ü—̓oƒbƒtƒ@‚̓NƒŠƒA ‚³‚ê‚Ü‚·�B

ƒoƒO

ƒ}ƒ‹ƒ`ƒoƒCƒg•¶Žš‚Í�³‚µ‚­ˆµ‚í‚ê‚Ü‚¹‚ñ�B�iƒ}ƒ‹ƒ`ƒoƒCƒg•¶Žš‚ð‚P•¶Žš�í�œ‚·‚é �ê�‡‚É BackSpace ‚ð•¡�”‰ñ“ü—Í‚·‚é•K—v‚ª‚ ‚è‚Ü‚·�B�j

ŽQ�l

Term::ReadPassword, Term::Getch

’˜�ìŒ

Copyright (C) 2005 Ken Takata <kentkt@anet.ne.jp>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ƒ_ƒEƒ“ƒ��[ƒh

�Å�V”Å‚Í�A http://webs.to/ken/ ‚©‚ç“üŽè‚Å‚«‚Ü‚·�B

1 POD Error

The following errors were encountered while parsing the POD:

Around line 2:

Non-ASCII character seen before =encoding in '–¼‘O'. Assuming CP1252