get '/product/:id' => sub { if( my $product = find_product( param('id') ) ) { return $product; } status 404; return { error => 'Not Found' }; };
get '/product/:id' => sub { if( my $product = find_product( param('id') ) ) { return $product; } status 404; return { error => 'Not Found' }; };