git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccc4981
)
browser,chars: error formatting for invalid input
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 30 Mar 2017 14:24:48 +0000
(16:24 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 24 Apr 2017 18:25:53 +0000
(20:25 +0200)
browser.plp
patch
|
blob
|
history
chars.plp
patch
|
blob
|
history
diff --git
a/browser.plp
b/browser.plp
index bdde90e3401d86467859776b2a090efce443790b..0d4d4e7c8ed17e7da6e8567f41db20164ac0af84 100644
(file)
--- a/
browser.plp
+++ b/
browser.plp
@@
-96,11
+96,13
@@
given ($get{usage} // 'wm') {
# none
}
when (!m{ \A [a-z]\w+ (?:/\d[\d-]*\d)? \z }x) {
- printf "<p>Invalid browser usage data request: <em>%s</em>",
- 'identifier must be alphanumeric name or <q>0</q>';
+ Alert([
+ 'Invalid browser usage data request',
+ 'Identifier must be alphanumeric name or <q>0</q>.',
+ ]);
}
$canihas = do "data/browser/usage-$_.inc.pl" or do {
-
printf "<p>Browser usage data not found: <em>%s</em>", $@ || $!
;
+
Alert('Browser usage data not found', $@ || $!)
;
break;
};
$usage = $_;
diff --git
a/chars.plp
b/chars.plp
index a175f8d136105b45729a77e3223273686c18ff1c..f9af5df7ce65348fd107f9252e5cfef55d363733 100644
(file)
--- a/
chars.plp
+++ b/
chars.plp
@@
-53,7
+53,7
@@
my $query = eval {
say "<h1>$title</h1>";
if (!$query) {
-
say "<p>Unicode group not specified: $@</p>"
;
+
Alert('Unicode group not specified', $@)
;
exit;
};