summaryrefslogtreecommitdiffstats
path: root/urpm/msg.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-21 16:18:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-21 16:18:20 +0000
commit01508b09ee68c55499c1b1a5ea658bb03204b96c (patch)
tree2c7bb480fad36a9cf020a42dcdeedf83552927ea /urpm/msg.pm
parent4d4f0f02bdb78f485e0735e591b98204e6fe8d11 (diff)
downloadurpmi-01508b09ee68c55499c1b1a5ea658bb03204b96c.tar
urpmi-01508b09ee68c55499c1b1a5ea658bb03204b96c.tar.gz
urpmi-01508b09ee68c55499c1b1a5ea658bb03204b96c.tar.bz2
urpmi-01508b09ee68c55499c1b1a5ea658bb03204b96c.tar.xz
urpmi-01508b09ee68c55499c1b1a5ea658bb03204b96c.zip
create urpm::msg::ask_yes_or_no() to remove duplication
Diffstat (limited to 'urpm/msg.pm')
-rw-r--r--urpm/msg.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/urpm/msg.pm b/urpm/msg.pm
index c61a9187..f9cd07e1 100644
--- a/urpm/msg.pm
+++ b/urpm/msg.pm
@@ -102,6 +102,11 @@ sub bug_log {
}
}
+sub ask_yes_or_no {
+ my ($msg) = @_;
+ message_input_($msg . N(" (y/N) "), boolean => 1) =~ /[$yesexpr]/;
+}
+
#- deprecated, use message_input_() instead
sub message_input { &_message_input }