summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-14 13:23:58 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-14 13:23:58 +0000
commitca65ae10ac5443fdb9fea25f8d53ea703554a8f8 (patch)
tree1a0a73f24bdd54fd615cdaba6b27fa8bee01f4ad
parentcee6a6a9b58ceff623628c7e0955016fa3d5f001 (diff)
downloaddrakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.tar
drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.tar.gz
drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.tar.bz2
drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.tar.xz
drakx-ca65ae10ac5443fdb9fea25f8d53ea703554a8f8.zip
(bestMatchSentence, bestMatchSentence2): in wantarray, return the number
of matched words/characters
-rw-r--r--perl-install/common.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 9fa9e620a..d680311b7 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -547,7 +547,7 @@ sub bestMatchSentence {
}
$best = $count, $bestSentence = $_ if $count > $best;
}
- $bestSentence;
+ wantarray ? ($bestSentence, $best) : $bestSentence;
}
# count the number of character that match
@@ -563,7 +563,7 @@ sub bestMatchSentence2 {
}
$best = $count, $bestSentence = $_ if $count > $best;
}
- $bestSentence;
+ wantarray ? ($bestSentence, $best) : $bestSentence;
}
sub typeFromMagic($@) {