.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Text::Xslate::Util 3pm" .TH Text::Xslate::Util 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Text::Xslate::Util \- A set of utilities for Xslate .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 9 \& use Text::Xslate::Util qw( \& mark_raw \& unmark_raw \& html_escape \& uri_escape \& p \& html_builder \& hash_with_default \& ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module provides utilities for Xslate. .SH INTERFACE .IX Header "INTERFACE" .SS "Exportable functions" .IX Subsection "Exportable functions" \fR\f(CImark_raw($str)\fR\fI\fR .IX Subsection "mark_raw($str)" .PP This is the entity of the \f(CW\*(C`mark_raw\*(C'\fR filter. .PP \fR\f(CIunmark_raw($str)\fR\fI\fR .IX Subsection "unmark_raw($str)" .PP This is the entity of the \f(CW\*(C`unmark_raw\*(C'\fR filter. .PP \fR\f(CIhtml_escape($str)\fR\fI\fR .IX Subsection "html_escape($str)" .PP This is the entity of the \f(CW\*(C`html_escape\*(C'\fR filter. .PP \fR\f(CIuri_escape($str)\fR\fI\fR .IX Subsection "uri_escape($str)" .PP This is the entity of the \f(CW\*(C`uri\*(C'\fR filter. .PP \fR\f(CIp($any)\fR\fI / \fR\f(CIdump($any)\fR\fI\fR .IX Subsection "p($any) / dump($any)" .PP Displays the contents of \fR\f(CI$any\fR\fI\fR using \f(CW\*(C`Data::Dumper\*(C'\fR. .PP This is the entity of the \f(CW\*(C`dump\*(C'\fR filter, useful for debugging. .PP \fR\f(CI\*(C`html_builder { block } | \e&function :CodeRef\*(C'\fR\fI\fR .IX Subsection "html_builder { block } | &function :CodeRef" .PP Wraps a block or \fI&function\fR with \f(CW\*(C`mark_raw\*(C'\fR so that the new subroutine will return a raw string. .PP This function is the same as what Text::Xslate exports. .PP \fR\f(CI\*(C`hash_with_default \e%hash, $default :Any\*(C'\fR\fI\fR .IX Subsection "hash_with_default %hash, $default :Any" .PP Set a default value \fR\f(CI$default\fR\fI\fR to \fI\fR\f(CI%hash\fR\fI\fR and returns a HashRef. .PP This is provided for debugging. .SH "SEE ALSO" .IX Header "SEE ALSO" Text::Xslate