+our $lang = $get{lang} || 'en';
+our $wordlistbase = "data/wordlist";
+
+if ($Request and $Request =~ m{\A([^/]+)}) {
+ my $name = $1;
+ my $page = "word/$name.plp";
+ if (-e $page) {
+ utf8::downgrade($page); # unicode filename breaks contents encoding
+ Include $page;
+ }
+ else {
+ Html({
+ raw => join("\n", map qq(<script src="/word/$_"></script>),
+ 'put.min.js', 'quiz.js', "$name.js",
+ ),
+ lang => $lang,
+ });
+ say '<h1>Words</h1>';
+ say '<section id="gallery"></section>';
+ say "<script>new Word\u$name()</script>";
+ }
+ exit;
+}
+
+my $limit = $get{v} // (exists $get{v} ? 5 : 3);