---
name: "Web::MREST::InitRouter"
section: "3pm"
platform: "linux"
package: "libweb-mrest-perl"
version: "0.290-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Web::MREST::InitRouter"
---

# Web::MREST::InitRouter(3pm)

Routines for initializing our Path::Router instance

## NAME

Web::MREST::InitRouter - Routines for initializing our Path::Router instance

## SYNOPSIS

Web::MREST uses Path::Router to match URIs to resources. All resources are packed into a single object. The singleton is exported as `$router` from this module and can be initialized by calling `"init_router"`, which is also exported, with no arguments.

```
    use Web::MREST::InitRouter qw( $router );
    ...
    Web::MREST::InitRouter::init_router() unless defined $router and $router->can( 'match' );
```

## PACKAGE VARIABLES

## EXPORTS

This module provides the following exports:

- $router (Path::Router singleton)

  - $resources (expanded resource definitions)

  ## FUNCTIONS
