Dancer2 icon indicating copy to clipboard operation
Dancer2 copied to clipboard

Allow overriding of prefix in add_route. #1663

Open GeekRuthie opened this issue 3 years ago • 1 comments

The order of the arguments in add_route was such that, whenever you called add_route from a plugin, any 'prefix' entry you submitted was ignored utterly. Rearranging the order here lets plugin authors override the prefix on their add_route calls, even with undef.

GeekRuthie avatar May 14 '22 22:05 GeekRuthie

Before merging, the warnings in t/app.t need to be investigated.

xsawyerx avatar Jul 05 '22 10:07 xsawyerx

I've pushed a commit that fills in some missing bits for the test state. These warnings were occurring when a 404 was reached, and the SERVER_PORT and SERVER_NAME were not set.

GeekRuthie avatar Jul 22 '23 03:07 GeekRuthie

Is there a reason a number of tests were commented out in t/app.t? The tests that changed to account for your patch make sense to me, but it seems like the ones that have been commented out are not related to the functionality in the branch.

Entirely possible I have missed something though :)

cromedome avatar Jul 24 '23 00:07 cromedome

that was my goof. I shorted out a bunch of other tests while I was working on the failures @xsawyerx had pointed out, and flat forgot to re-enable them. Fix pushed to this branch.

GeekRuthie avatar Jul 24 '23 17:07 GeekRuthie

Approved :+1:

@xsawyerx I'm considering your approval to still be valid as the core code remains unchanged since when you approved it.

cromedome avatar Jul 25 '23 00:07 cromedome

Merged!

cromedome avatar Jul 25 '23 01:07 cromedome

closed via merge of 5b56729b56db447d8ac8fc98f196c1982345f6cc

SysPete avatar Aug 17 '23 14:08 SysPete