.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Text::Xslate::Util 3pm" .TH Text::Xslate::Util 3pm "2017-01-21" "perl v5.24.1" "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" \fI\f(CI\*(C`mark_raw($str)\*(C'\fI\fR .IX Subsection "mark_raw($str)" .PP This is the entity of the \f(CW\*(C`mark_raw\*(C'\fR filter. .PP \fI\f(CI\*(C`unmark_raw($str)\*(C'\fI\fR .IX Subsection "unmark_raw($str)" .PP This is the entity of the \f(CW\*(C`unmark_raw\*(C'\fR filter. .PP \fI\f(CI\*(C`html_escape($str)\*(C'\fI\fR .IX Subsection "html_escape($str)" .PP This is the entity of the \f(CW\*(C`html_escape\*(C'\fR filter. .PP \fI\f(CI\*(C`uri_escape($str)\*(C'\fI\fR .IX Subsection "uri_escape($str)" .PP This is the entity of the \f(CW\*(C`uri\*(C'\fR filter. .PP \fI\f(CI\*(C`p($any)\*(C'\fI / \f(CI\*(C`dump($any)\*(C'\fI\fR .IX Subsection "p($any) / dump($any)" .PP Displays the contents of \fI\f(CI$any\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 \fI\f(CI\*(C`html_builder { block } | \e&function :CodeRef\*(C'\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 \fI\f(CI\*(C`hash_with_default \e%hash, $default :Any\*(C'\fI\fR .IX Subsection "hash_with_default %hash, $default :Any" .PP Set a default value \fI\f(CI$default\fI\fR to \fI\f(CI%hash\fI\fR and returns a HashRef. .PP This is provided for debugging. .SH "SEE ALSO" .IX Header "SEE ALSO" Text::Xslate