Templat...onstants(3)
π NAME π
okay bestie, welcome to Templat...onstants(3) from User Contributed Perl Documentation β this is the page for Template::Constants, and it defines constants for the Template Toolkit. slay. π
β¨ SYNOPSIS β¨
use Template::Constants qw( :status :error :all );
π¦ DESCRIPTION π¦
The Template::Constants module defines a bunch of constants used by the Template package, and it can optionally export them into the caller's namespace. cute, useful, iconic. π
You can use the constants by spelling out the Template::Constants package explicitly:
use Template::Constants;
print Template::Constants::STATUS_DECLINED;
You can also import constants into your own namespace by naming them as options to the use Template::Constants statement:
use Template::Constants qw( STATUS_DECLINED );
print STATUS_DECLINED;
Alternatively, you can specify one of these tagset identifiers to import whole sets of constants: ':status', ':error', ':all'.
use Template::Constants qw( :status );
print STATUS_DECLINED;
Want the full lore on exporting variables? Consult the documentation for the Exporter module. it's giving reference material, and honestly? valid. πβ¨
π EXPORTABLE TAG SETS π
The following tag sets and associated constants are defined β here's the whole roster, no cap:
:statusSTATUS_OKβ no problem, continueSTATUS_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)
:errorERROR_RETURNβ return a status code (e.g.'stop')ERROR_FILEβ file error: I/O, parse, recursionERROR_UNDEFβ undefined variable value usedERROR_PERLβ error in[% PERL %]blockERROR_FILTERβ filter errorERROR_PLUGINβ plugin error
:chompβ forPRE_CHOMPandPOST_CHOMPCHOMP_NONEβ do not remove whitespaceCHOMP_ONEβ remove whitespace to newlineCHOMP_ALLβ old name forCHOMP_ONE(deprecated)CHOMP_COLLAPSEβ collapse whitespace to a single spaceCHOMP_GREEDYβ remove all whitespace including newlines
:debugDEBUG_OFFβ do nothingDEBUG_ONβ basic debugging flagDEBUG_UNDEFβ throw undef on undefined variablesDEBUG_VARSβ general variable debuggingDEBUG_DIRSβ directive debuggingDEBUG_STASHβ general stash debuggingDEBUG_CONTEXTβ context debuggingDEBUG_PARSERβ parser debuggingDEBUG_PROVIDERβ provider debuggingDEBUG_PLUGINSβ plugins debuggingDEBUG_FILTERSβ filters debuggingDEBUG_SERVICEβ context debuggingDEBUG_ALLβ everythingDEBUG_CALLERβ add caller file/line infoDEBUG_FLAGSβ bitmap used internally
:all- All the above constants.
π AUTHOR π
the icon behind this page is Andy Wardley <abw@wardley.org> <http://wardley.org/>. periodt. π
π COPYRIGHT π
Copyright (C) 1996-2022 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π SEE ALSO π
Template, "Exporter"
that's the whole page, bestie π this one's from perl v5.42.0, dated 2024-06-23 β go be iconic with your constants πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Template-Toolkit 3.102.0-bp160.1.13 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Template-Toolkit 3.102.0-bp160.1.13 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Template-Toolkit 3.102.0-bp160.1.13 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Template-Toolkit 3.102.0-bp160.1.13 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms