From 84405a3bde840a526b4bea650fbe69963a900ef5 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 14 Nov 2016 16:41:25 +0100 Subject: warn when an action condition is bogus (mga#19172) thus showing we were using an unexported function for format test --- perl-install/diskdrake/interactive.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index f982301e3..5a6f853e4 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -442,7 +442,11 @@ sub part_possible_actions { $cond =~ s/$k/qq(($v))/e; } $cond =~ s/(^|[^:\$]) \b ([a-z]\w{3,}) \b ($|[\s&\)])/$1 . $2 . '($part)' . $3/exg; - eval $cond; + my $res = eval $cond; + if (my $err = $@) { + warn "ERROR: Bogus condition for '$actions{$_}': $err\n"; + } + $res; } @$actions_names; } } -- cgit v1.2.1