{"action":"created","issue":{"url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1127","repository_url":"https://api.github.com/repos/PerlDancer/Dancer2","labels_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1127/labels{/name}","comments_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1127/comments","events_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1127/events","html_url":"https://github.com/PerlDancer/Dancer2/issues/1127","id":131705729,"number":1127,"title":"route parameters with type constraints","user":{"login":"SysPete","id":6115812,"avatar_url":"https://avatars.githubusercontent.com/u/6115812?v=3","gravatar_id":"","url":"https://api.github.com/users/SysPete","html_url":"https://github.com/SysPete","followers_url":"https://api.github.com/users/SysPete/followers","following_url":"https://api.github.com/users/SysPete/following{/other_user}","gists_url":"https://api.github.com/users/SysPete/gists{/gist_id}","starred_url":"https://api.github.com/users/SysPete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SysPete/subscriptions","organizations_url":"https://api.github.com/users/SysPete/orgs","repos_url":"https://api.github.com/users/SysPete/repos","events_url":"https://api.github.com/users/SysPete/events{/privacy}","received_events_url":"https://api.github.com/users/SysPete/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PerlDancer/Dancer2/labels/Enhancement","name":"Enhancement","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-05T17:39:54Z","updated_at":"2016-02-07T18:32:31Z","closed_at":null,"body":"Would be nice to have type constraints for route parameters as suggested by @shadowcat-mst \r\n```\r\n<mst> get '/user/:id(Int)/'\r\n<mst> or similar\r\n<mst> which would default to Types::Standard\r\n<SysPete> absolutely\r\n<mst> but then you can create a MyApp::Types to declare your own in\r\n<mst> using Type::Library + inheritance\r\n<mst> in Catalyst we tried doing it via getting people to import the type constants, but that gets disappointingly crappy fast\r\n<mst> whereas\r\n<mst> set type_library => 'MyApp::Types';\r\n<mst> is relatively nice\r\n<SysPete> yup\r\n<mst> note: this design may also have problems. but my last attempt definitely did so :)\r\n```"},"comment":{"url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/comments/181074650","html_url":"https://github.com/PerlDancer/Dancer2/issues/1127#issuecomment-181074650","issue_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1127","id":181074650,"user":{"login":"SysPete","id":6115812,"avatar_url":"https://avatars.githubusercontent.com/u/6115812?v=3","gravatar_id":"","url":"https://api.github.com/users/SysPete","html_url":"https://github.com/SysPete","followers_url":"https://api.github.com/users/SysPete/followers","following_url":"https://api.github.com/users/SysPete/following{/other_user}","gists_url":"https://api.github.com/users/SysPete/gists{/gist_id}","starred_url":"https://api.github.com/users/SysPete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SysPete/subscriptions","organizations_url":"https://api.github.com/users/SysPete/orgs","repos_url":"https://api.github.com/users/SysPete/repos","events_url":"https://api.github.com/users/SysPete/events{/privacy}","received_events_url":"https://api.github.com/users/SysPete/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T18:32:31Z","updated_at":"2016-02-07T18:32:31Z","body":"@bigpresh this is the commit with my initial implementation: https://github.com/SysPete/Dancer2/commit/ccdffaddaa30fb3b2ccc553cfc3561731d1ae370. No pod updates and no tests pushed yet but that will happen in the next day or so. Changes are really small.\r\n"}}