Dancer2 0.300000 released

The Dancer Core Team has one more holiday treat in store for you: Dancer2 0.300000 is headed to CPAN, and it's a good one: Dancer now offers typed route parameters!

To be clear, all of the existing route syntax is unaffected. You don't have to use types, and typed parameters might not be good for all situations. There is a lot to be gained from having them though, and we're excited to bring them to you!

Using them in your own code is simple:

get '/thing/:id[Int]' => sub {};

# if not Int then perhaps a Num...
get '/thing/:id[Num]' => sub {};

The default type checking library is Type::Tiny, but you can also specify your own type checking library too. See the manual for more information.

A big thanks to SysPete for making this long-standing request a reality.

I'd also like to apologize to Tom Hukins. I erroneously listed a PR of his in the last release that didn't seem to make it in. I believe that I have made things better in this release.

Happy holidays from your friends at Dancer! See you in 2020.

1 Comment

Combination Dancer2 with Type::Tiny!

Leave a comment

About Jason A. Crome

user-pic Dancer developer, pilot, and hockey player.