- my ($thing, $ct, $fs) = @_;
- $ct //= '', $fs //= '';
- my $pkg = ucfirst $thing;
- get qr,$ct/$thing/, => $pkg;
- get qr,$ct/$thing/read, => "${pkg}::Read";
- get qr,$ct/$thing/$word$fs, => "${pkg}::Entry";
-# post qr,$ct/$thing/$word/create, => "${pkg}::Entry::Create";
- get qr,$ct/$thing/$word/read, => "${pkg}::Entry::Read";
-# post qr,$ct/$thing/$word/update, => "${pkg}::Entry::Update";
-# post qr,$ct/$thing/$word/delete, => "${pkg}::Entry::Delete";
+ for my $thing (@_) {
+ my $pkg = ucfirst $thing;
+ get qr,/$thing/, => $pkg;
+ get qr,/$thing/read, => "${pkg}::Read";
+ get qr,/$thing/$word, => "${pkg}::Entry";
+# post qr,/$thing/$word/create, => "${pkg}::Entry::Create";
+ get qr,/$thing/$word/read, => "${pkg}::Entry::Read";
+# post qr,/$thing/$word/update, => "${pkg}::Entry::Update";
+# post qr,/$thing/$word/delete, => "${pkg}::Entry::Delete";
+ }