$self->REST_route( widgets => { GET => { MEDIA_TYPES => [...], FUNCTION => [...] }, POST => { ... }, }, some_other_runmode => { GET => { ... }, POST => { ... }, }, ); #### # nothing in setup() sub get_widget : REST( GET => widgets, TYPES => [ 'application/xhtml+xml', 'text/html', 'text/plain' ], PARAMS => [ 'product_number' ] ) { # implementation }