WebDyne
view release on metacpan or search on metacpan
lib/WebDyne/Constant.pm view on Meta::CPAN
WEBDYNE_NODE_NAME_IX => 0,
WEBDYNE_NODE_ATTR_IX => 1,
WEBDYNE_NODE_CHLD_IX => 2,
WEBDYNE_NODE_SBST_IX => 3,
WEBDYNE_NODE_LINE_IX => 4,
WEBDYNE_NODE_LINE_TAG_END_IX => 5,
WEBDYNE_NODE_SRCE_IX => 6,
# Container structure
#
WEBDYNE_CONTAINER_META_IX => 0,
WEBDYNE_CONTAINER_DATA_IX => 1,
# Where compiled scripts are stored. Scripts are stored in
# here with a the inode of the source file as the cache
# file name.
#
WEBDYNE_CACHE_DN => &cache_dn,
# Empty cache files at startup ? Default is yes (psp files wil be
# recompiled again after a server restart)
#
WEBDYNE_STARTUP_CACHE_FLUSH => 1,
# How often to check cache for excess entries, clean to
# low_water if > high_water entries, based on last used
# time or frequency.
#
# clean_method 0 = clean based on last used time (oldest
# get cleaned)
#
# clean_method 1 = clean based on frequency of use (least
# used get cleaned)
#
WEBDYNE_CACHE_CHECK_FREQ => 256,
WEBDYNE_CACHE_HIGH_WATER => 64,
WEBDYNE_CACHE_LOW_WATER => 32,
WEBDYNE_CACHE_CLEAN_METHOD => 1,
# Type of eval code to run - use Safe module, or direct. Direct
# is default, but may allow subversion of code
#
# 1 = Safe # Not tested much - don't assume it is really safe !
# 0 = Direct (UnSafe)
#
WEBDYNE_EVAL_SAFE => 0,
# Prefix eval code with strict pragma. Can be undef'd to remove
# this behaviour, or altered to suit local taste
#
WEBDYNE_EVAL_USE_STRICT => 'use strict qw(vars);',
# Global opcode set, only these opcodes can be used if using a
# safe eval type. Uncomment the full_opset line if you want to
# be able to use all perl opcodes. Ignored if using direct eval
#
#WEBDYNE_EVAL_SAFE_OPCODE_AR => [&Opcode::full_opset()],
#WEBDYNE_EVAL_SAFE_OPCODE_AR => [&Opcode::opset(':default')],
WEBDYNE_EVAL_SAFE_OPCODE_AR => [':default'],
# Use strict var checking, eg will check that a when ${varname} param
# exists with a HTML page that the calling perl code (a) supplies a
# "varname" hash parm, and (b) that param is not undef
#
WEBDYNE_STRICT_VARS => 1,
# When a perl method loaded by a user calls another method within
# that just-loaded package (eg sub foo { shift()->bar() }), the
# WebDyne AUTOLOAD method gets called to work out where "bar" is,
# as it is not in the WebDyne ISA stack.
#
# By default, this gets done every time the routine is called,
# which can add up when done many times. By setting the var below
# to 1, the AUTOLOAD method will pollute the WebDyne class with
# a code ref to the method in question, saving a run through
# AUTOLOAD if it is ever called again. The downside - it is
# forever, and if your module has a method of the same name as
# one in the WebDyne class, it will clobber the WebDyne one, probably
# bringing the whole lot crashing down around your ears.
#
# The upside. A speedup of about 10% on modules that use AUTOLOAD
# heavily
#
WEBDYNE_AUTOLOAD_POLLUTE => 0,
# Dump flag. Set to 1 if you want the <dump> tag to display the
# current CGI status
#
WEBDYNE_DUMP_FLAG => 0,
# Encoding
#
WEBDYNE_HTML_CHARSET => do {
$constant_temp{'webdyne_html_charset'}='UTF-8'
},
# Content-type for text/html. Combined with charset to produce Content-type header
#
WEBDYNE_CONTENT_TYPE_HTML => do {
$constant_temp{'webdyne_content_type_html'}='text/html'
},
WEBDYNE_CONTENT_TYPE_HTML_ENCODED => do {
$constant_temp{'webdyne_content_type_html_encoded'}=sprintf('%s; charset=%s', @constant_temp{qw(webdyne_content_type_html webdyne_html_charset)})
},
# Content-type for text/plain. As above
#
WEBDYNE_CONTENT_TYPE_TEXT => do {
$constant_temp{'webdyne_content_type_text'}='text/plain'
},
WEBDYNE_CONTENT_TYPE_TEXT_ENCODED =>
sprintf('%s; charset=%s', @constant_temp{qw(webdyne_content_type_text webdyne_html_charset)}),
( run in 0.539 second using v1.01-cache-2.11-cpan-71847e10f99 )