#! /usr/bin/perl -w
@ISA
= (
'Exporter'
);
@EXPORT
=
qw()
;
our
$VERSION
= 0.16;
Hide Show 37 lines of Pod
my
$xac_settings
=
{
'accept_from'
, [
'scalar'
,1,
'word'
],
'access_log_path'
, [
'scalar'
,0,
'abs_create'
,
'rw'
],
'boot_log_path'
, [
'scalar'
,0,
'abs_create'
,
'rw'
],
'chime_multiplier'
, [
'scalar'
,0,
'integer'
, 2],
'clean_states_path'
, [
'scalar'
,0,
'path'
],
'config_type'
, [
'scalar'
,0,
'word'
],
'current_states_path'
, [
'scalar'
,0,
'path'
],
'debug_level'
, [
'scalar'
,0,
'debug_list'
],
'debug_log_path'
, [
'scalar'
,0,
'abs_create'
,
'rw'
],
'error_log_path'
, [
'scalar'
,0,
'abs_create'
,
'rw'
],
'log_file_paths'
, [
'list'
, 1,
'abs_create'
,
'rw'
],
'max_buffer_size'
, [
'scalar'
,0,
'integer'
, 1],
'max_connections'
, [
'scalar'
,0,
'integer'
, 1],
'max_input_length'
, [
'scalar'
,0,
'integer'
, 1],
'modifiable_data_files'
, [
'list'
, 1,
'abs_file'
,
'r'
,
'xml'
,
'clean_states_path'
],
'modifiable_transform_files'
, [
'list'
, 1,
'abs_file'
,
'r'
,
'xml'
,
'clean_states_path'
],
'path'
, [
'scalar'
,1,
'abs_dir'
,
'r'
],
'peel_multiplier'
, [
'scalar'
,0,
'integer'
,2],
'persistent_modifiable_files'
,[
'list'
, 1,
'abs_file'
,
'r'
,
'xml'
,
'clean_states_path'
],
'port'
, [
'scalar'
,0,
'integer'
, 1, 65535],
'server_ip'
, [
'scalar'
,0,
'ip'
],
'start_xte'
, [
'scalar'
,0,
'yes_no'
],
'startup_commands'
, [
'list'
, 1,
'abs_file'
,
'r'
,
'xml'
,
'startup_files_path'
],
'startup_files_path'
, [
'scalar'
,1,
'path'
],
'tick_interval'
, [
'scalar'
,0,
'float'
, 0.01],
'transform_xsl'
, [
'scalar'
,0,
'abs_file'
,
'r'
,
'xsl'
],
'very_persistent_modifiable_files'
,[
'list'
,0,
'abs_file'
,
'r'
,
'xml'
,
'clean_states_path'
],
};
my
$xte_settings
=
{
'xte_check_for_waiting'
, [
'scalar'
,1,
'integer'
,0],
'xte_cidr_allow'
, [
'list'
, 1,
'cidr'
],
'xte_cidr_deny'
, [
'list'
, 1,
'cidr'
],
'xte_docroot'
, [
'scalar'
,0,
'abs_dir'
,
'rw'
],
'xte_enable_static_serving'
, [
'scalar'
,0,
'yes_no'
],
'xte_from_address'
, [
'scalar'
,0,
'email'
],
'xte_gateway_auth'
, [
'scalar'
,0,
'word'
],
'xte_group'
, [
'scalar'
,1,
'word'
],
'xte_i18n_list'
, [
'list'
,0,
'abs_file'
,
'r'
,
'xml'
],
'xte_server_ip'
, [
'scalar'
,0,
'ip'
],
'xte_log_file'
, [
'scalar'
,1,
'abs_create'
,
'rw'
],
'xte_log_level'
, [
'scalar'
,1,
'integer'
,0, 4],
'xte_max_requests'
, [
'scalar'
,1,
'integer'
,1],
'xte_max_servers'
, [
'scalar'
,1,
'integer'
,1],
'xte_max_spare_servers'
, [
'scalar'
,1,
'integer'
,1],
'xte_mimetype_path'
, [
'scalar'
,1,
'abs_file'
,
'r'
],
'xte_min_servers'
, [
'scalar'
,1,
'integer'
,1],
'xte_min_spare_servers'
, [
'scalar'
,1,
'integer'
,1],
'xte_port'
, [
'scalar'
,0,
'integer'
, 1, 65535],
'xte_post_max'
, [
'scalar'
,0,
'integer'
,1],
'xte_smtp_charset'
, [
'scalar'
,0],
'xte_smtp_encoding'
, [
'scalar'
,0],
'xte_smtp_host'
, [
'scalar'
,0,
'ip'
],
'xte_smtp_port'
, [
'scalar'
,0,
'integer'
, 1, 65535],
'xte_static_directories'
, [
'list'
, 1,
'word'
],
'xte_splurge_input'
, [
'scalar'
,1,
'yes_no'
],
'xte_splurge_output'
, [
'scalar'
,1,
'yes_no'
],
'xte_temporary_file_path'
, [
'scalar'
,0,
'abs_create'
,
'rw'
],
'xte_user'
, [
'scalar'
,1,
'word'
],
'xte_use_xca'
, [
'scalar'
,0,
'yes_no'
],
'xte_xac_timeout'
, [
'scalar'
,0,
'integer'
,1]
};
my
$xca_settings
=
{
'xca_captcha_timeout'
, [
'scalar'
,0,
'integer'
],
'xca_castes'
, [
'list'
,1,
'word'
],
'xca_confirmation_timeout'
, [
'scalar'
,0,
'integer'
],
'xca_failed_login_lockout'
, [
'scalar'
,0,
'integer'
],
'xca_failed_login_lockout_reset'
, [
'scalar'
,0,
'integer'
],
'xca_from_address'
, [
'scalar'
,0,
'email'
],
'xca_http_domain'
, [
'scalar'
,0,
'word'
],
'xca_path'
, [
'scalar'
,0,
'abs_dir'
,
'r'
],
'xca_profile_template_path'
, [
'scalar'
,0,
'abs_file'
,
'r'
,
'xml'
],
'xca_script_debug_caste'
, [
'scalar'
,0,
'word'
],
'xca_session_timeout'
, [
'scalar'
,0,
'duration'
],
'xca_time_display_function'
, [
'scalar'
,1,
'function_name'
],
'xca_unique_registration_email'
, [
'scalar'
,0,
'yes_no'
]
};
my
$stop_settings
= {
'server_ip'
=> 1,
'port'
=> 1,
'start_xte'
=>1,
'xte_server_ip'
=> 1,
'xte_port'
=> 1
};
Hide Show 19 lines of Pod
sub
new {
my
$class
=
shift
;
my
$path
=
shift
;
my
$verbose
=
shift
|| 0;
my
$stop_only
=
shift
;
my
$stop_only_parse_text
=
""
;
$stop_only_parse_text
=
" (hosts and ports only)"
if
$stop_only
;
my
$lax
=
shift
|| 0;
my
$self
= {};
local_croak(Xcruciate::Utils::check_path(
'unit config file'
,
$path
,
'r'
,1));
print
"Attempting to parse xacd config file$stop_only_parse_text... "
if
$verbose
;
my
$parser
= XML::LibXML->new();
my
$xac_dom
=
$parser
->parse_file(
$path
);
print
"done\n"
if
$verbose
;
my
@config
=
$xac_dom
->findnodes(
"/config/scalar"
);
croak
"Config file doesn't look anything like a config file - 'xcruciate file_help' for some clues"
unless
$config
[0];
my
@config_type
=
$xac_dom
->findnodes(
"/config/scalar[\@name='config_type']/text()"
);
croak
"config_type entry not found in unit config file"
unless
$config_type
[0];
my
$config_type
=
$config_type
[0]->toString;
croak
"config_type in unit config file is '$config_type' (should be 'unit') - are you confusing xcruciate and unit config files?"
unless
$config_type
eq
'unit'
;
my
@config_path
=
$xac_dom
->findnodes(
"/config/scalar[\@name='path']/text()"
);
my
$config_path
=
$config_path
[0];
$config_path
=
$config_path
->toString
if
$config_path
;
my
@errors
= ();
foreach
my
$entry
(
$xac_dom
->findnodes(
"/config/*[(local-name() = 'scalar') or (local-name() = 'list')]"
)) {
push
@errors
,
sprintf
(
"No name attribute for element '%s'"
,
$entry
->nodeName)
unless
$entry
->hasAttribute(
'name'
);
my
$entry_record
=
$xac_settings
->{
$entry
->getAttribute(
'name'
)} ||
$xte_settings
->{
$entry
->getAttribute(
'name'
)} ||
$xca_settings
->{
$entry
->getAttribute(
'name'
)};
next
if
(
$stop_only
and not(
$stop_settings
->{
$entry
->getAttribute(
'name'
)}));
if
(not
defined
$entry_record
) {
carp
"WARNING: Unknown unit config entry '"
. (
$entry
->getAttribute('name
')) ."'
";
}
elsif
(not(
$entry
->nodeName eq
$entry_record
->[0])){
push
@errors
,
sprintf
(
"Entry called %s should be a %s not a %s"
,
$entry
->getAttribute(
'name'
),
$entry_record
->[0],
$entry
->nodeName);
}
elsif
((not
$entry
->textContent) and ((not
$entry_record
->[1]) or
$entry
->textContent!~/^\s*$/s)) {
push
@errors
,
sprintf
(
"Entry called %s requires a value"
,
$entry
->getAttribute(
'name'
))
}
elsif
((
$entry
->nodeName eq
'scalar'
) and
$entry_record
->[2] and ((not
$entry_record
->[1]) or
$entry
->textContent!~/^\s*$/s or
$entry
->textContent)){
my
$entry_path
=
$config_path
;
if
((
$entry_record
->[2] eq
'abs_file'
) and
$entry_record
->[5]) {
my
@entry_config_path
=
$xac_dom
->findnodes(
"/config/*[\@name='$entry_record->[5]']/text()"
);
$entry_path
.=
'/'
.
$entry_config_path
[0]->toString
if
$entry_config_path
[0];
}
push
@errors
,Xcruciate::Utils::type_check(
$entry_path
,
$entry
->getAttribute(
'name'
),
$entry
->textContent,
$entry_record
);
}
elsif
((
$entry
->nodeName eq
'list'
) and
$entry_record
){
my
@items
=
$entry
->findnodes(
'item/text()'
);
push
@errors
,
sprintf
(
"Entry called %s requires at least one item"
,
$entry
->getAttribute(
'name'
))
if
((not
$entry_record
->[2]) and (not
@items
));
my
$entry_path
=
$config_path
;
if
((
$entry_record
->[2] eq
'abs_file'
) and
$entry_record
->[5]) {
my
@entry_config_path
=
$xac_dom
->findnodes(
"/config/*[\@name='$entry_record->[5]']/text()"
);
$entry_path
.=
'/'
.
$entry_config_path
[0]->toString
if
$entry_config_path
[0];
}
my
$count
= 1;
foreach
my
$item
(
@items
) {
push
@errors
,Xcruciate::Utils::type_check(
$entry_path
,
$entry
->getAttribute(
'name'
),
$item
->textContent,
$entry_record
,
$count
);
$count
++;
}
}
push
@errors
,
sprintf
(
"Duplicate entry called %s"
,
$entry
->getAttribute(
'name'
))
if
defined
$self
->{
$entry
->getAttribute(
'name'
)};
if
(
$entry
->nodeName eq
'scalar'
) {
$self
->{
$entry
->getAttribute(
'name'
)} =
$entry
->textContent;
}
else
{
$self
->{
$entry
->getAttribute(
'name'
)} = []
unless
defined
$self
->{
$entry
->getAttribute(
'name'
)};
foreach
my
$item
(
$entry
->findnodes(
'item/text()'
)) {
push
@{
$self
->{
$entry
->getAttribute(
'name'
)}},
$item
->textContent;
}
}
}
foreach
my
$entry
(
keys
%{
$xac_settings
}) {
next
if
(
$stop_only
and not(
$stop_settings
->{
$entry
}));
push
@errors
,
sprintf
(
"No xacerbate entry called %s"
,
$entry
)
unless
((
defined
$self
->{
$entry
}) or (
$xac_settings
->{
$entry
}->[1]));
}
if
((
defined
$self
->{start_xte}) and (
$self
->{start_xte} eq
"yes"
)) {
foreach
my
$entry
(
keys
%{
$xte_settings
}) {
next
if
(
$stop_only
and not(
$stop_settings
->{
$entry
}));
push
@errors
,
sprintf
(
"No xteriorize entry called %s"
,
$entry
)
unless
((
defined
$self
->{
$entry
}) or (
$xte_settings
->{
$entry
}->[1]));
if
((
defined
$self
->{use_xca}) and (
$self
->{use_xca} eq
"yes"
)) {
foreach
my
$entry
(
keys
%{
$xca_settings
}) {
next
if
(
$stop_only
and not(
$stop_settings
->{
$entry
}));
push
@errors
,
sprintf
(
"No xcathedra entry called %s"
,
$entry
)
unless
((
defined
$self
->{
$entry
}) or (
$xca_settings
->{
$entry
}->[1]));
}
}
}
}
if
(
@errors
and
$lax
) {
if
(
$verbose
) {
foreach
(
@errors
) {
print
"ERROR: $_\n"
;
}
};
carp
"WARNING: Errors in unit config file, but lax flag set, so proceeding anyway. This could be exciting...\n"
;
bless
(
$self
,
$class
);
return
$self
;
}
elsif
(
@errors
){
foreach
(
@errors
) {
print
"ERROR: $_\n"
;
}
croak
"Errors in unit config file - cannot continue"
;
}
else
{
bless
(
$self
,
$class
);
return
$self
;
}
}
Hide Show 8 lines of Pod
sub
xac_file_format_description {
my
$self
=
shift
;
my
$ret
=
''
;
foreach
my
$entry
(
sort
(
keys
%{
$xac_settings
},
keys
%{
$xte_settings
})) {
my
$record
=
$xac_settings
->{
$entry
} ||
$xte_settings
->{
$entry
};
$ret
.=
"$entry ("
;
$ret
.=
"optional "
if
$record
->[1];
$ret
.=
"$record->[0])"
;
if
(not
$record
->[2]) {
}
elsif
((
$record
->[2] eq
'integer'
) or (
$record
->[2] eq
'float'
)) {
$ret
.=
" - $record->[2]"
;
$ret
.=
" >= $record->[3]"
if
defined
$record
->[3];
$ret
.=
" and <= $record->[4]"
if
defined
$record
->[4];
}
elsif
(
$record
->[2] eq
'ip'
) {
$ret
.=
" - ip address"
;
}
elsif
(
$record
->[2] eq
'word'
) {
$ret
.=
" - word (ie no whitespace)"
;
}
elsif
(
$record
->[2] eq
'path'
) {
$ret
.=
" - path (currently a word)"
;
}
elsif
(
$record
->[2] eq
'xml_leaf'
) {
$ret
.=
" - filename with an xml suffix"
;
}
elsif
(
$record
->[2] eq
'xsl_leaf'
) {
$ret
.=
" - filename with an xsl suffix"
;
}
elsif
(
$record
->[2] eq
'yes_no'
) {
$ret
.=
" - 'yes' or 'no'"
;
}
elsif
(
$record
->[2] eq
'email'
) {
$ret
.=
" - email address"
;
}
elsif
(
$record
->[2] eq
'debug_list'
) {
$ret
.=
" - comma-separated list of debugging options (or 'all'/'none')"
;
}
elsif
(
$record
->[2] eq
'abs_dir'
) {
$ret
.=
" - absolute directory path with $record->[3] permissions"
;
}
elsif
(
$record
->[2] eq
'abs_file'
) {
$ret
.=
" - absolute file path with $record->[3] permissions"
;
}
elsif
(
$record
->[2] eq
'abs_create'
) {
$ret
.=
" - absolute file path with $record->[3] permissions for directory"
;
}
$ret
.=
"\n"
;
}
return
$ret
;
}
Hide Show 8 lines of Pod
sub
accept_from {
my
$self
=
shift
;
return
$self
->{accept_from};
}
Hide Show 6 lines of Pod
sub
access_log_path {
my
$self
=
shift
;
return
$self
->{access_log_path};
}
Hide Show 6 lines of Pod
sub
boot_log_path {
my
$self
=
shift
;
return
$self
->{boot_log_path};
}
Hide Show 6 lines of Pod
sub
chime_multiplier {
my
$self
=
shift
;
return
$self
->{chime_multiplier};
}
Hide Show 6 lines of Pod
sub
clean_states_path {
my
$self
=
shift
;
return
$self
->{clean_states_path};
}
Hide Show 6 lines of Pod
sub
config_type {
my
$self
=
shift
;
return
$self
->{config_type};
}
Hide Show 6 lines of Pod
sub
current_states_path {
my
$self
=
shift
;
return
$self
->{current_states_path};
}
Hide Show 6 lines of Pod
sub
debug_level {
my
$self
=
shift
;
return
$self
->{debug_level};
}
Hide Show 6 lines of Pod
sub
debug_log_path {
my
$self
=
shift
;
return
$self
->{debug_log_path};
}
Hide Show 6 lines of Pod
sub
entry {
my
$self
=
shift
;
my
$name
=
shift
;
return
$self
->{
$name
};
}
Hide Show 6 lines of Pod
sub
error_log_path {
my
$self
=
shift
;
return
$self
->{error_log_path};
}
Hide Show 6 lines of Pod
sub
log_file_paths {
my
$self
=
shift
;
return
@{
$self
->{log_file_paths} || []};
}
Hide Show 6 lines of Pod
sub
max_buffer_size {
my
$self
=
shift
;
return
$self
->{max_buffer_size};
}
Hide Show 6 lines of Pod
sub
max_connections {
my
$self
=
shift
;
return
$self
->{max_connections};
}
Hide Show 6 lines of Pod
sub
max_input_length {
my
$self
=
shift
;
return
$self
->{max_input_length};
}
Hide Show 6 lines of Pod
sub
modifiable_data_files {
my
$self
=
shift
;
return
@{
$self
->{modifiable_data_files} || []};
}
Hide Show 6 lines of Pod
sub
modifiable_transform_files {
my
$self
=
shift
;
return
@{
$self
->{modifiable_transform_files} || []};
}
Hide Show 6 lines of Pod
sub
path {
my
$self
=
shift
;
return
$self
->{path};
}
Hide Show 6 lines of Pod
sub
peel_multiplier {
my
$self
=
shift
;
return
$self
->{peel_multiplier};
}
Hide Show 6 lines of Pod
sub
port {
my
$self
=
shift
;
return
$self
->{port};
}
Hide Show 6 lines of Pod
sub
persistent_modifiable_files {
my
$self
=
shift
;
return
@{
$self
->{persistent_modifiable_files} || []};
}
Hide Show 6 lines of Pod
sub
prepend_to_path {
my
$self
=
shift
;
my
$supplied_path
=
shift
;
my
$config_path
=
$self
->path;
if
(
$config_path
and
$supplied_path
!~m!^/!) {
return
"$config_path/$supplied_path"
;
}
else
{
return
$supplied_path
;
}
}
Hide Show 6 lines of Pod
sub
server_ip {
my
$self
=
shift
;
return
$self
->{server_ip};
}
Hide Show 6 lines of Pod
sub
start_xte {
my
$self
=
shift
;
if
(
lc
(
$self
->{start_xte}) eq
'yes'
) {
return
1
}
else
{
return
0}
}
Hide Show 6 lines of Pod
sub
startup_commands {
my
$self
=
shift
;
return
@{
$self
->{startup_commands} || []};
}
Hide Show 6 lines of Pod
sub
startup_files_path {
my
$self
=
shift
;
return
$self
->{startup_files_path};
}
Hide Show 6 lines of Pod
sub
tick_interval {
my
$self
=
shift
;
return
$self
->{tick_interval};
}
Hide Show 6 lines of Pod
sub
transform_xsl {
my
$self
=
shift
;
return
$self
->{transform_xsl};
}
Hide Show 6 lines of Pod
sub
very_persistent_modifiable_files {
my
$self
=
shift
;
return
@{
$self
->{very_persistent_modifiable_files} || []};
}
Hide Show 6 lines of Pod
sub
xca_captcha_timeout {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_captcha_timeout};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_castes {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
@{
$self
->{xca_castes} || []};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_confirmation_timeout {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_confirmation_timeout};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_failed_login_lockout {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_failed_login_lockout};
}
else
{
return
undef
;
}
Hide Show 6 lines of Pod
}
sub
xca_failed_login_lockout_reset {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_failed_login_lockout_reset};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_from_address {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_from_address};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_http_domain {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_http_domain};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_path {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xca_path};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_profile_template_path {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_profile_template_path};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_script_debug_caste {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_script_debug_caste};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_session_timeout {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
)) {
return
$self
->{xca_session_timeout};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_time_display_function {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xca_time_display_function};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xca_unique_registration_email {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and (
$self
->{use_xca} eq
'yes'
) and (
$self
->{xca_unique_registration_email} =
'yes'
)) {
return
1;
}
else
{
return
0;
}
}
Hide Show 6 lines of Pod
sub
xte_check_for_waiting {
my
$self
=
shift
;
return
$self
->{xte_check_for_waiting};
}
Hide Show 6 lines of Pod
sub
xte_cidr_allow {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and
$self
->{xte_cidr_allow}) {
return
@{
$self
->{xte_cidr_allow}};
}
else
{
return
();
}
}
Hide Show 6 lines of Pod
sub
xte_cidr_deny {
my
$self
=
shift
;
if
((
$self
->{start_xte} eq
'yes'
) and
$self
->{xte_cidr_deny}) {
return
@{
$self
->{xte_cidr_deny}};
}
else
{
return
();
}
}
Hide Show 6 lines of Pod
sub
xte_docroot {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_docroot};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_enable_static_serving {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
not(not
$self
->{xte_enable_static_serving});
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_from_address {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_from_address};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_gateway_auth {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_gateway_auth};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_group {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_group};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_i18n_list {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
@{
$self
->{xte_i18n_list} || []};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_log_file {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_log_file};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_log_level {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_log_level};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_max_servers {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_max_servers};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_max_requests {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_max_requests};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_max_spare_servers {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_max_spare_servers};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_mimetype_path {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_mimetype_path};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_min_servers {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_min_servers};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_min_spare_servers {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_min_spare_servers};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_port {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_port};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_post_max {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_post_max};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_server_ip {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_server_ip};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_smtp_charset {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_smtp_charset};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_smtp_encoding {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_smtp_encoding};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_smtp_host {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_smtp_host};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_smtp_port {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_smtp_port};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_splurge_input {
my
$self
=
shift
;
if
(not
$self
->{start_xte}) {
return
undef
;
}
elsif
(
lc
(
$self
->{xte_splurge_input}) eq
'yes'
) {
return
1
}
else
{
return
0}
}
Hide Show 6 lines of Pod
sub
xte_splurge_output {
my
$self
=
shift
;
if
(not
$self
->{start_xte}) {
return
undef
;
}
elsif
(
lc
(
$self
->{xte_splurge_output}) eq
'yes'
) {
return
1
}
else
{
return
0}
}
Hide Show 6 lines of Pod
sub
xte_static_directories {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
@{
$self
->{xte_static_directories} || []};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_temporary_file_path {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_temporary_file_path};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_user {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_user};
}
else
{
return
undef
;
}
}
Hide Show 6 lines of Pod
sub
xte_xac_timeout {
my
$self
=
shift
;
if
(
$self
->{start_xte} eq
'yes'
) {
return
$self
->{xte_xac_timeout};
}
else
{
return
undef
;
}
}
sub
local_croak {
my
$message
=
shift
;
croak
$message
if
$message
}
Hide Show 46 lines of Pod
1;