From 2e3f0212c97fa28ed9fa4837ef532da2db5312ed Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 19 Jul 2002 13:15:03 +0000 Subject: nicer error message when {val} is not set for ask_from & list --- perl-install/interactive.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'perl-install') diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 644e75a29..e978e9b6d 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -262,6 +262,7 @@ sub ask_from_normalize { foreach my $e (@$l) { if (my $li = $e->{list}) { + ref $e->{val} eq 'SCALAR' or internal_error($e->{val} ? "field {val} must be a reference" : "field {val} is mandatory"); if ($e->{sort} || @$li > 10 && !exists $e->{sort}) { my @l2 = map { may_apply($e->{format}, $_) } @$li; my @places = sort { $l2[$a] cmp $l2[$b] } 0 .. $#l2; -- cgit v1.2.1