The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Slick::RouteMap

SYNOPSIS

Slick::RouteMap is a simple "Hash-Trie" that resolves routes extremely fast, at the cost of using slightly more memory than other routing schemes.

API

get

Given a uri (Str), method (Str), and Slick::Context, find the associated Slick::Route, and return it. Otherwise return undef.

add

Given a Slick::Route and a uri (Str), add it to the Hash-Trie for later lookup.

merge

Merges two given Slick::RouteMaps. This is the primary mechanism behind Slick::Router.

See also