---
name: "Text::Xslate::Util"
section: "3pm"
platform: "linux"
package: "libtext-xslate-perl"
version: "3.5.9-2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Text::Xslate::Util"
---

# Text::Xslate::Util(3pm)

A set of utilities for Xslate

## NAME

Text::Xslate::Util - A set of utilities for Xslate

## SYNOPSIS

```
    use Text::Xslate::Util qw(
        mark_raw
        unmark_raw
        html_escape
        uri_escape
        p
        html_builder
        hash_with_default
    );
```

## DESCRIPTION

This module provides utilities for Xslate.

## INTERFACE

### Exportable functions

*mark\_raw($str)*

This is the entity of the `"mark_raw"` filter.

*unmark\_raw($str)*

This is the entity of the `"unmark_raw"` filter.

*html\_escape($str)*

This is the entity of the `"html_escape"` filter.

*uri\_escape($str)*

This is the entity of the `"uri"` filter.

*p($any) / dump($any)*

Displays the contents of *$any* using `"Data::Dumper"`.

This is the entity of the `"dump"` filter, useful for debugging.

*"html\_builder { block } \| \\&function :CodeRef"*

Wraps a block or *&function* with `"mark_raw"` so that the new subroutine will return a raw string.

This function is the same as what Text::Xslate exports.

*"hash\_with\_default \\%hash, $default :Any"*

Set a default value *$default* to *%hash* and returns a HashRef.

This is provided for debugging.

## SEE ALSO

Text::Xslate
