summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-04-07 10:03:22 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-04-07 10:03:22 +0200
commit26bd6e152eac77c2fb272a2fffba6c3ce1d0c156 (patch)
treeb4b64c77a859802e8a363beb2d8ab4533b596854 /bin
parent9abfcfa3dc389001d9c5a2f8a95b17bf3fbad5c8 (diff)
efa: Display possible values for every ambiguous input
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa12
1 files changed, 4 insertions, 8 deletions
diff --git a/bin/efa b/bin/efa
index 7d0b7d9..bf28342 100755
--- a/bin/efa
+++ b/bin/efa
@@ -91,17 +91,13 @@ $www->submit_form(
$content = $www->content;
# ambiguous input
-if ($content =~ /<span class="errorTextBold">Bitte auswählen<\/span>/s) {
- print STDERR "Ambiguous input for ";
- if ($content =~ /<select name="(?<what>(place|type|name)_(origin|destination))"/) {
- print STDERR "$+{what}\n";
- } else {
- print STDERR "unknown\n";
+foreach (split(/<span class="errorTextBold">Bitte auswählen<\/span>/s, $content)) {
+ if (/<select name="(?<what>(place|type|name)_(origin|destination))"/) {
+ print STDERR "Ambiguous input for $+{what}\n";
}
- while ($content =~ /<option value="\d+:\d+"( selected)?>(?<choice>[^<]+)<\/option>/gs) {
+ while (/<option value="\d+(:\d+)*"( selected)?>(?<choice>[^<]+)<\/option>/gs) {
print STDERR "\t$+{choice}\n";
}
- exit(1);
}
foreach (split(/<span class="labelTextBold"> \d+\. Fahrt<\/span>/, $content)) {