package ProductsAPI; use Dancer; set("serializer", "JSON"); get '/product/:id' => sub { my $product = find_product( param('id') ); return $product; }; dance;
package ProductsAPI; use Dancer; set("serializer", "JSON"); get '/product/:id' => sub { my $product = find_product( param('id') ); return $product; }; dance;