.\" -*- 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 "Template::Constants 3" .TH Template::Constants 3 2023-07-25 "perl v5.38.0" "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 Template::Constants \- Defines constants for the Template Toolkit .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Template::Constants qw( :status :error :all ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \f(CW\*(C`Template::Constants\*(C'\fR modules defines, and optionally exports into the caller's namespace, a number of constants used by the Template package. .PP Constants may be used by specifying the \f(CW\*(C`Template::Constants\*(C'\fR package explicitly: .PP .Vb 2 \& use Template::Constants; \& print Template::Constants::STATUS_DECLINED; .Ve .PP Constants may be imported into the caller's namespace by naming them as options to the \f(CW\*(C`use Template::Constants\*(C'\fR statement: .PP .Vb 2 \& use Template::Constants qw( STATUS_DECLINED ); \& print STATUS_DECLINED; .Ve .PP Alternatively, one of the following tagset identifiers may be specified to import sets of constants: '\f(CW\*(C`:status\*(C'\fR', '\f(CW\*(C`:error\*(C'\fR', '\f(CW\*(C`:all\*(C'\fR'. .PP .Vb 2 \& use Template::Constants qw( :status ); \& print STATUS_DECLINED; .Ve .PP Consult the documentation for the \f(CW\*(C`Exporter\*(C'\fR module for more information on exporting variables. .SH "EXPORTABLE TAG SETS" .IX Header "EXPORTABLE TAG SETS" The following tag sets and associated constants are defined: .PP .Vb 7 \& :status \& STATUS_OK # no problem, continue \& STATUS_RETURN # ended current block then continue (ok) \& STATUS_STOP # controlled stop (ok) \& STATUS_DONE # iterator is all done (ok) \& STATUS_DECLINED # provider declined to service request (ok) \& STATUS_ERROR # general error condition (not ok) \& \& :error \& ERROR_RETURN # return a status code (e.g. \*(Aqstop\*(Aq) \& ERROR_FILE # file error: I/O, parse, recursion \& ERROR_UNDEF # undefined variable value used \& ERROR_PERL # error in [% PERL %] block \& ERROR_FILTER # filter error \& ERROR_PLUGIN # plugin error \& \& :chomp # for PRE_CHOMP and POST_CHOMP \& CHOMP_NONE # do not remove whitespace \& CHOMP_ONE # remove whitespace to newline \& CHOMP_ALL # old name for CHOMP_ONE (deprecated) \& CHOMP_COLLAPSE # collapse whitespace to a single space \& CHOMP_GREEDY # remove all whitespace including newlines \& \& :debug \& DEBUG_OFF # do nothing \& DEBUG_ON # basic debugging flag \& DEBUG_UNDEF # throw undef on undefined variables \& DEBUG_VARS # general variable debugging \& DEBUG_DIRS # directive debugging \& DEBUG_STASH # general stash debugging \& DEBUG_CONTEXT # context debugging \& DEBUG_PARSER # parser debugging \& DEBUG_PROVIDER # provider debugging \& DEBUG_PLUGINS # plugins debugging \& DEBUG_FILTERS # filters debugging \& DEBUG_SERVICE # context debugging \& DEBUG_ALL # everything \& DEBUG_CALLER # add caller file/line info \& DEBUG_FLAGS # bitmap used internally \& \& :all \& All the above constants. .Ve .SH AUTHOR .IX Header "AUTHOR" Andy Wardley .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 1996\-2022 Andy Wardley. All Rights Reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" Template, \f(CW\*(C`Exporter\*(C'\fR