From 01508b09ee68c55499c1b1a5ea658bb03204b96c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 21 Oct 2008 16:18:20 +0000 Subject: create urpm::msg::ask_yes_or_no() to remove duplication --- urpm/msg.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'urpm') 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 } -- cgit v1.2.1