This document discusses the settings used in PET one can override. These settings are by default found in $BASEPATH/global.conf.
Note -- this part of the documentation is TOTALLY incomplete! Do not trust it, it will be rewritten soon!
| Config | This document discusses the settings used in PET one can override. |
| Notation | There are global and local parameters. |
| Currently implemented config parameters | |
| unimplemented or broken config parameters |
There are global and local parameters. The global parameters are true for the whole site, while local parameters are only true for one page. [FIXME: we might use per-directory settings / regexp based rules later on. ] Some config parameters can also be overwritten using the PET::Dispatcher::setConf() method.
Some parameters can be overwritten, some can not (e.g. SQL handlers are defined site-wide and are not redefineable.) We use the following notation to show which parameters can or cannot be overwritten:
| G | Global |
| L | Local |
| P | Can be set from your APIs in runtime |
All parameters are G,L,P, unless noted otherwise. Defaults are denoted bold.
The config file uses the CPAN module Config::General, which is an XML-like syntax -- only simpler. We use the slash -- / -- character to denote levels in the config. E.g. “general/chroot = On” means :
<general> ... chroot = On ... </general>
| general/defaultcharset ( string, *iso-8859-2* ) | The charset to set the response encoding to (NOT forced!) |
| general/fillinform ( On|Off, *Off* ) | Call HTML::FillInForm by default on the output string (HTML). |
| general/develbasicauth [G] ( string, “”) | Expects a string in the form of “username:password”, which is used during development to protect all pages of the site using HTTP BASIC AUTH. |
| general/ErrorDocument_404 [G] ( string, “” ) | The (.pet) file to display when there is a HTTP.404 error (file not found). (Right now this changes the status code to 200 instead of 404!) |
| general/ErrorDocument_500 [G] ( string, “” ) | The (.html) file to display when there is a HTTP.500 error PET detects (your webserver might use a different 500 page!) |
| general/utils [G] ( string, “”) | A list of Util modules you plan to use in your APIs. The separator character is a space. |
| general/reloadmodules [G] ( On|Off, *Off* ) | Reload modules as they change on the disc. Slows down everything very much, but handy while developing/debugging. |
| general/template/interpolate [G] ( On|Off, *On* ) | Makes Template.pm interpolate variables without using [% ... %], e.g. “${subst.variable}” |
| general/template/timer [G] ( On|Off, *Off* ) | Switches on Template.pm’s internal processing-time counter. |
| general/template/preprocessutil [G] ( string, “” ) | Here you can put a list of modules which are executed before the templates are processed (passed to Template.pm). You can imagine this as a filter that you run before processing. Very useful for example to generate multilingual versions of websites/pages. |
| general/log/strict [G] ( On|Off, *Off* ) | If set, then PET::Log can only write to the predefined logfiles -- that is, to warning, error, debug and performance. |
| general/log/debug [G] ( On|Off, *On* ) | Switches debug.log on or off. |
| general/log/performance [G] ( On|Off, *Off* ) | Switches performance.log on or off (need BSD::Itimer). |
| general/rlimit/VMEM [G] ( string, “” ) | You can set a resource limit for VMEM here if your OS supports it. E.g. “100M”. |
general/utils
general/fullprofiling
template/filters
This ise.
| run/fcgiexternal | When running in “External FastCGI mode”, that is, using PET::RUN::FCGIExternal. |
| run/fcgiexternal/port [G] ( number, “” ) | A port number to bind to when PET runs in eFCGI (external FastCGI) mode. |
| run/fcgiexternal/processes [G] ( number, 10 ) | Number of processes to fork in eFCGI mode. |
| run/fcgiexternal/socket [G] ( path, “” ) | If port is undefined, this is a (UNIX) socket path PET binds to when running in eFCGI mode. |
| run/fcgiexternal/setuid [G] ( number, “” ) | Change to this UID after start (if PET was started as root) when running in eFCGI mode. This only works when starting the server as root. |
| run/fcgiexternal/setgid [G] ( number, “” ) | Change to this GID after start (if PET was started as root) when running in eFCGI mode. This only works when starting the server as root. |
| session/class [G] ( string, “” ) | The Session-handler class to use (e.g. PET::Session::Simple). |
| session/ramdiskpath [G] (string, undef) | When you use a session handler that needs the ramdisk, this is where you put the dir to the ramdisk. This could be something like “/dev/shm/sessions”. Note that you can use a “regular” this, PET will not care, it will only use what you set up here. |
| actionmapper/class [G] (string, undef) | The class to use, e.g. PET::ActionMapper::Subdir. |
actionmapper/methodcallprefix
actionmapper/slashsubst
actionmapper/apibase
| forcecharset ( string, “” ) | Use the given encoding, but before that, actually try to convert the output string to this encoding. |
| chroot [G] ( 0|1, *0* ) | Chroot to $BASEPATH |
| embperl [G] ( 0|1, *1* ) | Switch on PERL and RAWPERL extension in Template.pm. (Right now this is always ON.) |
| refreshpassphrase [G] ( string, “”) | Given a parameter “_REFRESHPET=1” to any URL this will result in switching “reloadmodules” on for one request. Your really should know what you are doing if you tried this! |
| callerrorurl [G] ( url, “” ) | if set to a valid URL, then any error events generated during execution calls this URL with a short textual messages. This might be used to notify the administrator about problems in the system. |
Note -- this documentation is misleadeing and incomplete! It’s just a placeholder!
sub setConf