Dancer2
Dancer2 copied to clipboard
Add method to change the route sub
For my new plugin https://github.com/PerlDancer/Dancer2-Plugin-OpenAPI I need a way to exchange the route sub from the plugin. This is currently not possible through the code accessor, so I resorted to the dirty way:
$plugin->operations->{ $operation_id }->{code} = $route_sub;
It would be nice to have a writer for code. If you agree with me, I will submit a PR.