diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-28 21:51:36 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-28 21:51:36 +0000 |
commit | 33ff0afcc8698cac0b050749878dd9e95ae51f1a (patch) | |
tree | 760a94703317bc9621eebc6007bbd57466eaf246 /perl-install | |
parent | adad06dd92f56cd6be3ce69a36a5b2819690f111 (diff) | |
download | drakx-backup-do-not-use-33ff0afcc8698cac0b050749878dd9e95ae51f1a.tar drakx-backup-do-not-use-33ff0afcc8698cac0b050749878dd9e95ae51f1a.tar.gz drakx-backup-do-not-use-33ff0afcc8698cac0b050749878dd9e95ae51f1a.tar.bz2 drakx-backup-do-not-use-33ff0afcc8698cac0b050749878dd9e95ae51f1a.tar.xz drakx-backup-do-not-use-33ff0afcc8698cac0b050749878dd9e95ae51f1a.zip |
fix "nicer error message when {val} is not set for ask_from & list" in case of a reference to a reference (ref is REF instead of SCALAR)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/interactive.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index ebbd14fc9..6a9f488a9 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -262,7 +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"); + ref($e->{val}) =~ /SCALAR|REF/ or internal_error($e->{val} ? "field {val} must be a reference (it is $e->{val})" : "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; |