POE-Component-OpenSSH

 view release on metacpan or  search on metacpan

t/01-correct_object.t  view on Meta::CPAN

use Test::More tests => 5;
use POE::Kernel;
use Term::ReadKey;
use Term::ReadPassword;

SKIP: {
    my ( $user, $pass );
    eval {
        local $SIG{'ALRM'} = sub { die "timeout\n"; };
        alarm 10;
        $user = getpwuid $EFFECTIVE_USER_ID;
        $pass = read_password("Local SSH Pass for $user: ");
        #ReadMode 0;
        alarm 0;
    };

    if ( $@ =~ /timeout/ ) {
        ReadMode 'normal';
        skip 'Youz a Wuss!' => 5;
    }



( run in 0.403 second using v1.01-cache-2.11-cpan-8d75d55dd25 )