- when (qr{^[\d,;\s+-]+$}) {
- push @querydesc, "character codepoints $_";
- for (map { split /[^\d-]/ } $_) {
- my ($charnum, $range) = split /-/, $_;
- push @chars, chr $_ for $charnum .. ($range // $charnum);
- }
- }
- when ($_) {
- my $row = $groupinfo->{$_} or do {
- warn "group $_ not found";
- next;
- };
- push @querydesc, $row->{-name} // $_;
- push @chars, map { chr } @{ $row->{-chars} };
- }
- default {
- die "unknown parameter: $_\n";
+ return $_ if m{^[0-9 +-]+$};
+
+ my ($cat, $name) = split m{/}, $_, 2 or die "invalid query\n";
+ if (!$name) {
+ ($cat, $name) = ('table', $cat);