File-KeePass-Agent

 view release on metacpan or  search on metacpan

lib/File/KeePass/Agent/unix.pm  view on Meta::CPAN

    my $out = Term::ReadLine->new('fkp')->readline($msg, $def);
    _term_raw() if $was_raw;

    $out = '' if ! defined $out;
    $out =~ s/\s+$//;
    $out =~ s{~/}{$self->home_dir.'/'}e;
    return length($out) ? $out : $def;
}

sub home_dir {
    my ($user,$passwd,$uid,$gid,$quota,$comment,$gcos,$home,$shell,$expire) = getpwuid($<);
    return $home || croak "Couldn't find home dir for uid $<";
}

sub _config_file {
    my $self = shift;
    my $home = $self->home_dir;
    return "$home/.keepassx/config" if -e "$home/.keepassx/config";
    return "$home/.config/keepassx/config.ini";
}



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