Replies: 1 comment 2 replies
-
I wonder if Mojo::Path->parts might be what you want. Perhaps this would work for you? my $pets = $couch->clone;
$pets->path->parts([$c->param('animal'), $c->param('id')]);
$c->ua->get_p($pets)
->then(sub ($tx) { $c->render(pet => $tx->res->json) }); The above naturally wouldn't work if you already have path elements in the cloned URL. If that is the case those would have to be prepended. If you are looking into this further and want something that would work with existing path elements then perhaps adding arrayref-support to I cannot speak to a patch being welcome or not, but if it has complete test coverage, follow the style requirements and don't have negative performance implications (this should be testet and methodology / code shared) then the chances are definitely much better than if those requirements are not met. |
Beta Was this translation helpful? Give feedback.
-
I buld a load of couchdb urls from request parameters:
A couple of my apps contain this:
Which means I can safely:
... which seems a bit nicer
Would a well tested patch like this be interesting to y'all?
Beta Was this translation helpful? Give feedback.
All reactions