or die "failed to set window size: $!\n";
}
-sub read_password(;$$) {
+sub read_password($;$$) {
my ($query, $infd, $outfd) = @_;
my $password = '';
return $password;
}
+sub get_confirmed_password {
+ my $pw1 = read_password('Enter new password: ');
+ my $pw2 = read_password('Retype new password: ');
+ die "passwords do not match\n" if $pw1 ne $pw2;
+ return $pw1;
+}
+
# Class functions
sub new {