"Fossies" - the Fresh Open Source Software archive 
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>Interchange Reference Pages: Configuration directives</title><link rel="stylesheet" type="text/css" href="xmldocs.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_" /></head><body><div class="reference"><div class="titlepage"><div><div><h1 class="title"><a id="confs"></a>Interchange Reference Pages: Configuration directives</h1></div></div><hr /></div><div class="partintro"><div></div><p>
For a complete introduction to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> config files and the supported syntax, please see the <a href="glossary.html#configuration" class="olink">configuration</a> glossary entry.
</p><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="refentrytitle"><a href="#AcceptRedirect">AcceptRedirect</a></span><span class="refpurpose"> — accept Web server redirects
</span></dt><dt><span class="refentrytitle"><a href="#Accounting">Accounting</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#AccumulateCode">AccumulateCode</a></span><span class="refpurpose"> — fetch Interchange code on-demand from CodeRepository instead of starting up with everything
</span></dt><dt><span class="refentrytitle"><a href="#AcrossLocks">AcrossLocks</a></span><span class="refpurpose"> — open real databases instead of fast dummy pointers
</span></dt><dt><span class="refentrytitle"><a href="#ActionMap">ActionMap</a></span><span class="refpurpose"> — modify existing or define custom Interchange actions
</span></dt><dt><span class="refentrytitle"><a href="#AddDirective">AddDirective</a></span><span class="refpurpose"> — add a new configuration directive
</span></dt><dt><span class="refentrytitle"><a href="#AdminSub">AdminSub</a></span><span class="refpurpose"> — restrict specific global subroutines to catalogs listed under AllowGlobal directive
</span></dt><dt><span class="refentrytitle"><a href="#AdminUser">AdminUser</a></span><span class="refpurpose"> — (obsolete) specify usernames that are given full access to all catalogs, regardless of any permissions
</span></dt><dt><span class="refentrytitle"><a href="#AliasTable">AliasTable</a></span><span class="refpurpose"> — specify table containing page aliases ("redirect" instructions)
</span></dt><dt><span class="refentrytitle"><a href="#AllowGlobal">AllowGlobal</a></span><span class="refpurpose"> — specify catalogs allowed to operate with full Interchange server permissions
</span></dt><dt><span class="refentrytitle"><a href="#AllowRemoteSearch">AllowRemoteSearch</a></span><span class="refpurpose"> — specify database tables accessible for remote searches
</span></dt><dt><span class="refentrytitle"><a href="#AlwaysSecure">AlwaysSecure</a></span><span class="refpurpose"> — specify pages that are always to be served over a HTTPS connection
</span></dt><dt><span class="refentrytitle"><a href="#AsciiTrack">AsciiTrack</a></span><span class="refpurpose"> — specify filename to which formatted order reports should be appended
</span></dt><dt><span class="refentrytitle"><a href="#AutoEnd">AutoEnd</a></span><span class="refpurpose"> — specify macro to be executed automatically at the end of every page access
</span></dt><dt><span class="refentrytitle"><a href="#AutoModifier">AutoModifier</a></span><span class="refpurpose"> — specify products table columns containing values for product attributes
</span></dt><dt><span class="refentrytitle"><a href="#AutoVariable">AutoVariable</a></span><span class="refpurpose"> — specify config directives to make available through the Variable space
</span></dt><dt><span class="refentrytitle"><a href="#Autoload">Autoload</a></span><span class="refpurpose"> — specify actions to be executed automatically at the beginning of every page access
</span></dt><dt><span class="refentrytitle"><a href="#BounceReferrals">BounceReferrals</a></span><span class="refpurpose"> — remove visible affiliate code from URLs after first access
</span></dt><dt><span class="refentrytitle"><a href="#BounceReferralsRobot">BounceReferralsRobot</a></span><span class="refpurpose"> — <span class="inlinemediaobject"><img src="./images/new.png" /></span>
remove visible affiliate code from URLs after first access (for robots only)
</span></dt><dt><span class="refentrytitle"><a href="#BounceRobotSessionURL">BounceRobotSessionURL</a></span><span class="refpurpose"> — <span class="inlinemediaobject"><img src="./images/new.png" /></span>
remove explicit mv_session_id in RobotUA request if provided
</span></dt><dt><span class="refentrytitle"><a href="#Capability">Capability</a></span><span class="refpurpose"> — test existence of a capability
</span></dt><dt><span class="refentrytitle"><a href="#CartTrigger">CartTrigger</a></span><span class="refpurpose"> — specify subroutines to invoke when cart contents change
</span></dt><dt><span class="refentrytitle"><a href="#CartTriggerQuantity">CartTriggerQuantity</a></span><span class="refpurpose"> — specify whether quantity changes to cart items will cause CartTrigger subroutines to execute
</span></dt><dt><span class="refentrytitle"><a href="#Catalog">Catalog</a></span><span class="refpurpose"> — register catalog with the Interchange server
</span></dt><dt><span class="refentrytitle"><a href="#CatalogUser">CatalogUser</a></span><span class="refpurpose"> — specify catalog-specific usernames to use when accessing files with absolute pathnames
</span></dt><dt><span class="refentrytitle"><a href="#CategoryField">CategoryField</a></span><span class="refpurpose"> — specify name of the "category" field in the Interchange database
</span></dt><dt><span class="refentrytitle"><a href="#CheckHTML">CheckHTML</a></span><span class="refpurpose"> — check the generated HTML code with an external program
</span></dt><dt><span class="refentrytitle"><a href="#ChildLife">ChildLife</a></span><span class="refpurpose"> — define maximum child process lifetime
</span></dt><dt><span class="refentrytitle"><a href="#CodeDef">CodeDef</a></span><span class="refpurpose"> — generic subroutine mapper
</span></dt><dt><span class="refentrytitle"><a href="#CodeRepository">CodeRepository</a></span><span class="refpurpose"> — specify directory containing code that can be included in the running installation when needed
</span></dt><dt><span class="refentrytitle"><a href="#CommonAdjust">CommonAdjust</a></span><span class="refpurpose"> — define default settings for a flexible, chained item pricing scheme
</span></dt><dt><span class="refentrytitle"><a href="#ConfDir">ConfDir</a></span><span class="refpurpose"> — specify catalog "config" directory
</span></dt><dt><span class="refentrytitle"><a href="#ConfigAllAfter">ConfigAllAfter</a></span><span class="refpurpose"> — specify config files to read as part of every catalog's configuration, after all its files are read in first
</span></dt><dt><span class="refentrytitle"><a href="#ConfigAllBefore">ConfigAllBefore</a></span><span class="refpurpose"> — specify config files to read as part of every catalog's configuration, before any of its files are read in
</span></dt><dt><span class="refentrytitle"><a href="#ConfigDatabase">ConfigDatabase</a></span><span class="refpurpose"> — specify database holding definitions usually found in catalog.cfg
</span></dt><dt><span class="refentrytitle"><a href="#ConfigDir">ConfigDir</a></span><span class="refpurpose"> — specify default "include" directory for "<file" notation
</span></dt><dt><span class="refentrytitle"><a href="#ConfigParseComments">ConfigParseComments</a></span><span class="refpurpose"> — (obsolete) treat config meta-directives as plain comments
</span></dt><dt><span class="refentrytitle"><a href="#CookieDomain">CookieDomain</a></span><span class="refpurpose"> — set domain common to all servers providing Interchange content
</span></dt><dt><span class="refentrytitle"><a href="#CookieLogin">CookieLogin</a></span><span class="refpurpose"> — allow autologin based on username and password stored in a client cookie
</span></dt><dt><span class="refentrytitle"><a href="#CookieName">CookieName</a></span><span class="refpurpose"> — specify Interchange session cookie name
</span></dt><dt><span class="refentrytitle"><a href="#CookiePattern">CookiePattern</a></span><span class="refpurpose"> — specify regular expression to extract session ID out of a client cookie
</span></dt><dt><span class="refentrytitle"><a href="#Cookies">Cookies</a></span><span class="refpurpose"> — specify whether Interchange will try to send session cookies to client browsers
</span></dt><dt><span class="refentrytitle"><a href="#CountrySubdomains">CountrySubdomains</a></span><span class="refpurpose"> — honor ccTLD domains in IP qualification
</span></dt><dt><span class="refentrytitle"><a href="#CreditCardAuto">CreditCardAuto</a></span><span class="refpurpose"> — encrypt credit card information automatically
</span></dt><dt><span class="refentrytitle"><a href="#CustomShipping">CustomShipping</a></span><span class="refpurpose"> — specify SQL query to use in obtaining shipping costs data
</span></dt><dt><span class="refentrytitle"><a href="#DNSBL">DNSBL</a></span><span class="refpurpose"> — specify real-time DNS blocklist servers
</span></dt><dt><span class="refentrytitle"><a href="#DataTrace">DataTrace</a></span><span class="refpurpose"> — trace DBI calls with variable granularity
</span></dt><dt><span class="refentrytitle"><a href="#Database">Database</a></span><span class="refpurpose"> — register existing database table for use with Interchange
</span></dt><dt><span class="refentrytitle"><a href="#DatabaseAuto">DatabaseAuto</a></span><span class="refpurpose"> — register database tables for use with Interchange automatically
</span></dt><dt><span class="refentrytitle"><a href="#DatabaseAutoIgnore">DatabaseAutoIgnore</a></span><span class="refpurpose"> — prevent DatabaseAuto from configuring tables whose names match regex pattern
</span></dt><dt><span class="refentrytitle"><a href="#DatabaseDefault">DatabaseDefault</a></span><span class="refpurpose"> — specify default settings for Database directives
</span></dt><dt><span class="refentrytitle"><a href="#DebugFile">DebugFile</a></span><span class="refpurpose"> — specify Interchange debug output filename
</span></dt><dt><span class="refentrytitle"><a href="#DebugHost">DebugHost</a></span><span class="refpurpose"> — restrict debug mode to requests originating from specific hosts
</span></dt><dt><span class="refentrytitle"><a href="#DebugTemplate">DebugTemplate</a></span><span class="refpurpose"> — specify format of debug messages
</span></dt><dt><span class="refentrytitle"><a href="#DefaultLocale">DefaultLocale</a></span><span class="refpurpose"> — specify default locale
</span></dt><dt><span class="refentrytitle"><a href="#DefaultShipping">DefaultShipping</a></span><span class="refpurpose"> — specify default shipping method
</span></dt><dt><span class="refentrytitle"><a href="#DeleteDirective">DeleteDirective</a></span><span class="refpurpose"> — disable use of specified configuration directive in catalog.cfg
</span></dt><dt><span class="refentrytitle"><a href="#DeliverImage">DeliverImage</a></span><span class="refpurpose"> — allow delivery of images through Interchange
</span></dt><dt><span class="refentrytitle"><a href="#DescriptionField">DescriptionField</a></span><span class="refpurpose"> — specify name of the "description" field in the Interchange database
</span></dt><dt><span class="refentrytitle"><a href="#DirConfig">DirConfig</a></span><span class="refpurpose"> — batch-set a bunch of variables (or values in general) from files
</span></dt><dt><span class="refentrytitle"><a href="#DirectiveDatabase">DirectiveDatabase</a></span><span class="refpurpose"> — specify database to read configuration directives from
</span></dt><dt><span class="refentrytitle"><a href="#DirectoryIndex">DirectoryIndex</a></span><span class="refpurpose"> — specify the default page in a directory
</span></dt><dt><span class="refentrytitle"><a href="#DiscountSpaceVar">DiscountSpaceVar</a></span><span class="refpurpose"> — specify names of CGI variables to check for discount space definition
</span></dt><dt><span class="refentrytitle"><a href="#DiscountSpacesOn">DiscountSpacesOn</a></span><span class="refpurpose"> — enable "discount spaces" feature
</span></dt><dt><span class="refentrytitle"><a href="#DisplayErrors">DisplayErrors</a></span><span class="refpurpose"> — display eventual errors directly in the client session
</span></dt><dt><span class="refentrytitle"><a href="#DomainTail">DomainTail</a></span><span class="refpurpose"> — honor only the toplevel domain in IP qualification
</span></dt><dt><span class="refentrytitle"><a href="#DowncaseVarname">DowncaseVarname</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#DumpAllCfg">DumpAllCfg</a></span><span class="refpurpose"> — dump global Interchange server configuration
</span></dt><dt><span class="refentrytitle"><a href="#DumpStructure">DumpStructure</a></span><span class="refpurpose"> — dump Interchange server and catalog structure for each catalog
</span></dt><dt><span class="refentrytitle"><a href="#EncryptKey">EncryptKey</a></span><span class="refpurpose"> — specify default key to use for encryption
</span></dt><dt><span class="refentrytitle"><a href="#EncryptProgram">EncryptProgram</a></span><span class="refpurpose"> — specify default encryption program
</span></dt><dt><span class="refentrytitle"><a href="#Environment">Environment</a></span><span class="refpurpose"> — specify environment variables to inherit from the calling CGI link program
</span></dt><dt><span class="refentrytitle"><a href="#ErrorDestination">ErrorDestination</a></span><span class="refpurpose"> — route error messages to different files, based on message content or arbitrary tag
</span></dt><dt><span class="refentrytitle"><a href="#ErrorFile">ErrorFile</a></span><span class="refpurpose"> — specify error log filename
</span></dt><dt><span class="refentrytitle"><a href="#ExecutionLocale">ExecutionLocale</a></span><span class="refpurpose"> — specify lowest-level locale
</span></dt><dt><span class="refentrytitle"><a href="#External">External</a></span><span class="refpurpose"> — enable dump of selected global and catalog values for use by external programs
</span></dt><dt><span class="refentrytitle"><a href="#ExternalExport">ExternalExport</a></span><span class="refpurpose"> — specify Perl variables to dump to external file
</span></dt><dt><span class="refentrytitle"><a href="#ExternalFile">ExternalFile</a></span><span class="refpurpose"> — specify external dump filename
</span></dt><dt><span class="refentrytitle"><a href="#ExtraSecure">ExtraSecure</a></span><span class="refpurpose"> — disallow unencrypted access to pages which are listed under AlwaysSecure
</span></dt><dt><span class="refentrytitle"><a href="#FallbackIP">FallbackIP</a></span><span class="refpurpose"> —
</span></dt><dt><span class="refentrytitle"><a href="#Feature">Feature</a></span><span class="refpurpose"> — specify Interchange "feature" for activation in the catalog
</span></dt><dt><span class="refentrytitle"><a href="#FeatureDir">FeatureDir</a></span><span class="refpurpose"> — specify "feature" directory
</span></dt><dt><span class="refentrytitle"><a href="#FileControl">FileControl</a></span><span class="refpurpose"> — specify page names and Perl subroutines that implement access control
</span></dt><dt><span class="refentrytitle"><a href="#FileDatabase">FileDatabase</a></span><span class="refpurpose"> — specify table and column to look up in search for file contents
</span></dt><dt><span class="refentrytitle"><a href="#Filter">Filter</a></span><span class="refpurpose"> — specify variables and filters through which they should be run through automatically
</span></dt><dt><span class="refentrytitle"><a href="#FormAction">FormAction</a></span><span class="refpurpose"> — define or override form action
</span></dt><dt><span class="refentrytitle"><a href="#FormIgnore">FormIgnore</a></span><span class="refpurpose"> — specify variables that should not be propagated from CGI to Values space
</span></dt><dt><span class="refentrytitle"><a href="#FractionalItems">FractionalItems</a></span><span class="refpurpose"> — allow fractional quantities in the shopping cart
</span></dt><dt><span class="refentrytitle"><a href="#FullUrl">FullUrl</a></span><span class="refpurpose"> — use full URLs (those including hostnames) in catalog definition lines
</span></dt><dt><span class="refentrytitle"><a href="#FullUrlIgnorePort">FullUrlIgnorePort</a></span><span class="refpurpose"> — <span class="inlinemediaobject"><img src="./images/new.png" /></span>
</span></dt><dt><span class="refentrytitle"><a href="#Glimpse">Glimpse</a></span><span class="refpurpose"> — specify program path and options for the Glimpse search engine
</span></dt><dt><span class="refentrytitle"><a href="#GlobalSub">GlobalSub</a></span><span class="refpurpose"> — define global Perl functions for use within Interchange
</span></dt><dt><span class="refentrytitle"><a href="#HTMLsuffix">HTMLsuffix</a></span><span class="refpurpose"> — specify filename extension for files in the PageDir and TemplateDir directories
</span></dt><dt><span class="refentrytitle"><a href="#HammerLock">HammerLock</a></span><span class="refpurpose"> — number of seconds after which a locked session is considered lost due to malfunction
</span></dt><dt><span class="refentrytitle"><a href="#History">History</a></span><span class="refpurpose"> — how many most-recent user clicks should be saved in session history
</span></dt><dt><span class="refentrytitle"><a href="#HitCount">HitCount</a></span><span class="refpurpose"> — increment a counter on every catalog access
</span></dt><dt><span class="refentrytitle"><a href="#HostnameLookups">HostnameLookups</a></span><span class="refpurpose"> — perform hostname lookups (DNS resolving)
</span></dt><dt><span class="refentrytitle"><a href="#HotDBI">HotDBI</a></span><span class="refpurpose"> — specify catalogs that should use persistent database connections
</span></dt><dt><span class="refentrytitle"><a href="#HouseKeeping">HouseKeeping</a></span><span class="refpurpose"> — specify number of seconds between periodic "house keeping" jobs
</span></dt><dt><span class="refentrytitle"><a href="#HouseKeepingCron">HouseKeepingCron</a></span><span class="refpurpose"> — define Interchange-aware crontab entries
</span></dt><dt><span class="refentrytitle"><a href="#IPCsocket">IPCsocket</a></span><span class="refpurpose"> — specify IPC socket filename
</span></dt><dt><span class="refentrytitle"><a href="#ImageAlias">ImageAlias</a></span><span class="refpurpose"> — specify alias location for all image files
</span></dt><dt><span class="refentrytitle"><a href="#ImageDir">ImageDir</a></span><span class="refpurpose"> — specify base location for all image files
</span></dt><dt><span class="refentrytitle"><a href="#ImageDirInternal">ImageDirInternal</a></span><span class="refpurpose"> — (obsolete)
</span></dt><dt><span class="refentrytitle"><a href="#ImageDirSecure">ImageDirSecure</a></span><span class="refpurpose"> — specify base location for all IMG and INPUT src= files served over HTTPS
</span></dt><dt><span class="refentrytitle"><a href="#Inet_Mode">Inet_Mode</a></span><span class="refpurpose"> — specify whether Interchange server should open an INET socket and listen on a port
</span></dt><dt><span class="refentrytitle"><a href="#IpHead">IpHead</a></span><span class="refpurpose"> — use only part of the IP to qualify user sessions
</span></dt><dt><span class="refentrytitle"><a href="#IpQuad">IpQuad</a></span><span class="refpurpose"> — specify number of dot-quads to honor when IpHead is enabled
</span></dt><dt><span class="refentrytitle"><a href="#ItemAction">ItemAction</a></span><span class="refpurpose"> — specify subroutine to invoke when users' electronic cart contents change
</span></dt><dt><span class="refentrytitle"><a href="#Jobs">Jobs</a></span><span class="refpurpose"> — define parameters for batch jobs
</span></dt><dt><span class="refentrytitle"><a href="#Levies">Levies</a></span><span class="refpurpose"> — specify levy sections to apply
</span></dt><dt><span class="refentrytitle"><a href="#Levy">Levy</a></span><span class="refpurpose"> — define levy section (levy key)
</span></dt><dt><span class="refentrytitle"><a href="#Limit">Limit</a></span><span class="refpurpose"> — set or modify various limits
</span></dt><dt><span class="refentrytitle"><a href="#Locale">Locale</a></span><span class="refpurpose"> — specify locale definitions
</span></dt><dt><span class="refentrytitle"><a href="#LocaleDatabase">LocaleDatabase</a></span><span class="refpurpose"> — specify database that contains locale settings
</span></dt><dt><span class="refentrytitle"><a href="#LockType">LockType</a></span><span class="refpurpose"> — specify file locking method to use
</span></dt><dt><span class="refentrytitle"><a href="#LockoutCommand">LockoutCommand</a></span><span class="refpurpose"> — specify command to run in order to lock a client out of the site
</span></dt><dt><span class="refentrytitle"><a href="#LogFile">LogFile</a></span><span class="refpurpose"> — specify Interchange log output filename
</span></dt><dt><span class="refentrytitle"><a href="#Logging">Logging</a></span><span class="refpurpose"> — specify log granularity treshold
</span></dt><dt><span class="refentrytitle"><a href="#MailOrderTo">MailOrderTo</a></span><span class="refpurpose"> — specify e-mail address that completed orders should be sent to
</span></dt><dt><span class="refentrytitle"><a href="#Mall">Mall</a></span><span class="refpurpose"> — issue cookies only for the current catalog, and not the base domain
</span></dt><dt><span class="refentrytitle"><a href="#MasterHost">MasterHost</a></span><span class="refpurpose"> — specify regular expression that client IP must match to access protected directories
</span></dt><dt><span class="refentrytitle"><a href="#MaxQuantityField">MaxQuantityField</a></span><span class="refpurpose"> — specify tables and columns containing maximum allowed quantity for an item
</span></dt><dt><span class="refentrytitle"><a href="#MaxRequestsPerChild">MaxRequestsPerChild</a></span><span class="refpurpose"> — define maximum number of per-server page deliveries before respawn
</span></dt><dt><span class="refentrytitle"><a href="#MaxServers">MaxServers</a></span><span class="refpurpose"> — define maximum number of spawned servers
</span></dt><dt><span class="refentrytitle"><a href="#Member">Member</a></span><span class="refpurpose"> — override catalog variables for logged-in users
</span></dt><dt><span class="refentrytitle"><a href="#Message">Message</a></span><span class="refpurpose"> — write custom message to console and Interchange log
</span></dt><dt><span class="refentrytitle"><a href="#MimeType">MimeType</a></span><span class="refpurpose"> — specify MIME types
</span></dt><dt><span class="refentrytitle"><a href="#MinQuantityField">MinQuantityField</a></span><span class="refpurpose"> — specify table and/or column containing minimum allowed quantity for an item
</span></dt><dt><span class="refentrytitle"><a href="#MoreDB">MoreDB</a></span><span class="refpurpose"> — enable saving of search paging files into users' DBI sessions
</span></dt><dt><span class="refentrytitle"><a href="#NoAbsolute">NoAbsolute</a></span><span class="refpurpose"> — deny catalogs to read absolute filenames on the system
</span></dt><dt><span class="refentrytitle"><a href="#NoExport">NoExport</a></span><span class="refpurpose"> — specify databases not to re-export
</span></dt><dt><span class="refentrytitle"><a href="#NoExportExternal">NoExportExternal</a></span><span class="refpurpose"> — enable use of the NoExport directive
</span></dt><dt><span class="refentrytitle"><a href="#NoImport">NoImport</a></span><span class="refpurpose"> — specify databases not to re-import, unless the database completely disappears
</span></dt><dt><span class="refentrytitle"><a href="#NoImportExternal">NoImportExternal</a></span><span class="refpurpose"> — do not re-import external databases
</span></dt><dt><span class="refentrytitle"><a href="#NoSearch">NoSearch</a></span><span class="refpurpose"> — specify databases on which Interchange-style searches cannot be performed
</span></dt><dt><span class="refentrytitle"><a href="#NonTaxableField">NonTaxableField</a></span><span class="refpurpose"> — specify name of the non-taxable field in the products database
</span></dt><dt><span class="refentrytitle"><a href="#NotRobotUA">NotRobotUA</a></span><span class="refpurpose"> — specify user-agents that will NOT be classified as crawler bots (search engines)
</span></dt><dt><span class="refentrytitle"><a href="#OfflineDir">OfflineDir</a></span><span class="refpurpose"> — specify directory to use for "offline" files
</span></dt><dt><span class="refentrytitle"><a href="#OnFly">OnFly</a></span><span class="refpurpose"> — enable on-fly additions to client shopping cart
</span></dt><dt><span class="refentrytitle"><a href="#Options">Options</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#OptionsAttribute">OptionsAttribute</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#OptionsEnable">OptionsEnable</a></span><span class="refpurpose"> — specify table and/or column for option type
</span></dt><dt><span class="refentrytitle"><a href="#OrderCleanup">OrderCleanup</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#OrderCounter">OrderCounter</a></span><span class="refpurpose"> — specify file that keeps and increments order count
</span></dt><dt><span class="refentrytitle"><a href="#OrderLineLimit">OrderLineLimit</a></span><span class="refpurpose"> — specify maximum number of items the user is allowed to place in the shopping cart
</span></dt><dt><span class="refentrytitle"><a href="#OrderProfile">OrderProfile</a></span><span class="refpurpose"> — specify files containing order profile definitions
</span></dt><dt><span class="refentrytitle"><a href="#OrderReport">OrderReport</a></span><span class="refpurpose"> — specify location of the order report form
</span></dt><dt><span class="refentrytitle"><a href="#PGP">PGP</a></span><span class="refpurpose"> — encrypt complete order reports automatically
</span></dt><dt><span class="refentrytitle"><a href="#PIDcheck">PIDcheck</a></span><span class="refpurpose"> — check running Interchange processes during the HouseKeeping routine
</span></dt><dt><span class="refentrytitle"><a href="#PIDfile">PIDfile</a></span><span class="refpurpose"> — PID filename
</span></dt><dt><span class="refentrytitle"><a href="#PageDir">PageDir</a></span><span class="refpurpose"> — specify directory containing catalog pages
</span></dt><dt><span class="refentrytitle"><a href="#PageSelectField">PageSelectField</a></span><span class="refpurpose"> — specify products database column used to select the flypage
</span></dt><dt><span class="refentrytitle"><a href="#PageTableMap">PageTableMap</a></span><span class="refpurpose"> — map field names for page lookup tables
</span></dt><dt><span class="refentrytitle"><a href="#PageTables">PageTables</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#ParseVariables">ParseVariables</a></span><span class="refpurpose"> — parse (interpolate) config file variables
</span></dt><dt><span class="refentrytitle"><a href="#Password">Password</a></span><span class="refpurpose"> — specify password for RemoteUser
</span></dt><dt><span class="refentrytitle"><a href="#PerlAlwaysGlobal">PerlAlwaysGlobal</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#PerlNoStrict">PerlNoStrict</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#PermanentDir">PermanentDir</a></span><span class="refpurpose"> — specify directory containing temporary files for permanent searches
</span></dt><dt><span class="refentrytitle"><a href="#PostURL">PostURL</a></span><span class="refpurpose"> — specify URL for POST requests
</span></dt><dt><span class="refentrytitle"><a href="#Pragma">Pragma</a></span><span class="refpurpose"> — specify pragma's default value
</span></dt><dt><span class="refentrytitle"><a href="#PreFork">PreFork</a></span><span class="refpurpose"> — specify whether Interchange server should pre-fork processes that wait for client connections
</span></dt><dt><span class="refentrytitle"><a href="#PreForkSingleFork">PreForkSingleFork</a></span><span class="refpurpose"> — perform one instead of two forks in PreFork mode
</span></dt><dt><span class="refentrytitle"><a href="#Preload">Preload</a></span><span class="refpurpose"> — specify macro to be executed at the very beginning of every request
</span></dt><dt><span class="refentrytitle"><a href="#PriceCommas">PriceCommas</a></span><span class="refpurpose"> — show thousands separator in price pictures
</span></dt><dt><span class="refentrytitle"><a href="#PriceDefault">PriceDefault</a></span><span class="refpurpose"> — specify default price field in chained pricing schemes
</span></dt><dt><span class="refentrytitle"><a href="#PriceDivide">PriceDivide</a></span><span class="refpurpose"> — specify number to divide the price by, to obtain price in units
</span></dt><dt><span class="refentrytitle"><a href="#PriceField">PriceField</a></span><span class="refpurpose"> — specify name of the "price" field in the Interchange database
</span></dt><dt><span class="refentrytitle"><a href="#ProcessPage">ProcessPage</a></span><span class="refpurpose"> — specify "virtual" location of the form processor page
</span></dt><dt><span class="refentrytitle"><a href="#ProductDir">ProductDir</a></span><span class="refpurpose"> — specify directory containing database files
</span></dt><dt><span class="refentrytitle"><a href="#ProductFiles">ProductFiles</a></span><span class="refpurpose"> — specify all databases containing products that form one big "products" database
</span></dt><dt><span class="refentrytitle"><a href="#Profile">Profile</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#Profiles">Profiles</a></span><span class="refpurpose"> — specify files containing OrderProfile definitions on a global level
</span></dt><dt><span class="refentrytitle"><a href="#Promiscuous">Promiscuous</a></span><span class="refpurpose"> — allow output of HTML code in value variables
</span></dt><dt><span class="refentrytitle"><a href="#ReadPermission">ReadPermission</a></span><span class="refpurpose"> — affect file mode (read permissions, specifically) on Interchange-generated files
</span></dt><dt><span class="refentrytitle"><a href="#RedirectCache">RedirectCache</a></span><span class="refpurpose"> — use Interchange to generate static web server pages
</span></dt><dt><span class="refentrytitle"><a href="#RemoteUser">RemoteUser</a></span><span class="refpurpose"> — specify required value of the REMOTE_USER environment variable
</span></dt><dt><span class="refentrytitle"><a href="#Replace">Replace</a></span><span class="refpurpose"> — reset directive to a new value, or to its default
</span></dt><dt><span class="refentrytitle"><a href="#Require">Require</a></span><span class="refpurpose"> — require existence of a capability
</span></dt><dt><span class="refentrytitle"><a href="#RobotHost">RobotHost</a></span><span class="refpurpose"> — specify hostnames that will be classified as crawler bots (search engines) visiting the site
</span></dt><dt><span class="refentrytitle"><a href="#RobotIP">RobotIP</a></span><span class="refpurpose"> — specify IP numbers or ranges that will be classified as crawler bots (search engines)
</span></dt><dt><span class="refentrytitle"><a href="#RobotLimit">RobotLimit</a></span><span class="refpurpose"> — specify maximum number of pages a user can visit without a short pause
</span></dt><dt><span class="refentrytitle"><a href="#RobotUA">RobotUA</a></span><span class="refpurpose"> — specify user-agents that will be classified as crawler bots (search engines)
</span></dt><dt><span class="refentrytitle"><a href="#Route">Route</a></span><span class="refpurpose"> — specify order and payment routes
</span></dt><dt><span class="refentrytitle"><a href="#RouteDatabase">RouteDatabase</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#RunDir">RunDir</a></span><span class="refpurpose"> — specify directory containing runtime files
</span></dt><dt><span class="refentrytitle"><a href="#SOAP">SOAP</a></span><span class="refpurpose"> — enable handling of SOAP RPC requests
</span></dt><dt><span class="refentrytitle"><a href="#SOAP_Action">SOAP_Action</a></span><span class="refpurpose"> — define SOAP actions
</span></dt><dt><span class="refentrytitle"><a href="#SOAP_Control">SOAP_Control</a></span><span class="refpurpose"> — control access to SOAP features
</span></dt><dt><span class="refentrytitle"><a href="#SOAP_Enable">SOAP_Enable</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#SOAP_MaxRequests">SOAP_MaxRequests</a></span><span class="refpurpose"> — define maximum number of per-server SOAP RPC response deliveries before respawn
</span></dt><dt><span class="refentrytitle"><a href="#SOAP_Perms">SOAP_Perms</a></span><span class="refpurpose"> — specify SOAP RPC Unix socket permissions
</span></dt><dt><span class="refentrytitle"><a href="#SOAP_Socket">SOAP_Socket</a></span><span class="refpurpose"> — specify name of SOAP RPC socket file
</span></dt><dt><span class="refentrytitle"><a href="#SOAP_StartServers">SOAP_StartServers</a></span><span class="refpurpose"> — specify number of servers which should be started to handle SOAP RPC requests
</span></dt><dt><span class="refentrytitle"><a href="#SafeTrap">SafeTrap</a></span><span class="refpurpose"> — specify operation codes to trap in Safe.pm compartments
</span></dt><dt><span class="refentrytitle"><a href="#SafeUntrap">SafeUntrap</a></span><span class="refpurpose"> — specify operation codes to untrap in Safe.pm compartments
</span></dt><dt><span class="refentrytitle"><a href="#SalesTax">SalesTax</a></span><span class="refpurpose"> — specifies sales tax calculation mode
</span></dt><dt><span class="refentrytitle"><a href="#SalesTaxFunction">SalesTaxFunction</a></span><span class="refpurpose"> — specify custom tax calculation function
</span></dt><dt><span class="refentrytitle"><a href="#SaveExpire">SaveExpire</a></span><span class="refpurpose"> — specify the amount of time for which Interchange cookies should be valid (their expiry time)
</span></dt><dt><span class="refentrytitle"><a href="#ScratchDefault">ScratchDefault</a></span><span class="refpurpose"> — define default scratch variable values
</span></dt><dt><span class="refentrytitle"><a href="#ScratchDir">ScratchDir</a></span><span class="refpurpose"> — specify directory containing temporary files
</span></dt><dt><span class="refentrytitle"><a href="#SearchProfile">SearchProfile</a></span><span class="refpurpose"> — specify files containing search profile definitions
</span></dt><dt><span class="refentrytitle"><a href="#SecurePostURL">SecurePostURL</a></span><span class="refpurpose"> — specify URL for secure POST requests
</span></dt><dt><span class="refentrytitle"><a href="#SecureURL">SecureURL</a></span><span class="refpurpose"> — specify base URL of the Interchange catalog link program, when pages are served over HTTPS
</span></dt><dt><span class="refentrytitle"><a href="#SendMailProgram">SendMailProgram</a></span><span class="refpurpose"> — sendmail (or compatible) binary location
</span></dt><dt><span class="refentrytitle"><a href="#SeparateItems">SeparateItems</a></span><span class="refpurpose"> — treat items with quantity greater than 1 as separate items
</span></dt><dt><span class="refentrytitle"><a href="#SessionCookieSecure">SessionCookieSecure</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#SessionDB">SessionDB</a></span><span class="refpurpose"> — specify name of a database to use with DBI-based sessions
</span></dt><dt><span class="refentrytitle"><a href="#SessionDatabase">SessionDatabase</a></span><span class="refpurpose"> — specify location of the file-based user sessions database
</span></dt><dt><span class="refentrytitle"><a href="#SessionExpire">SessionExpire</a></span><span class="refpurpose"> — specify a duration after which idle user sessions expire
</span></dt><dt><span class="refentrytitle"><a href="#SessionHashLength">SessionHashLength</a></span><span class="refpurpose"> — specify the number of characters to hash session directories
</span></dt><dt><span class="refentrytitle"><a href="#SessionHashLevels">SessionHashLevels</a></span><span class="refpurpose"> — specify the number of levels to hash session directories
</span></dt><dt><span class="refentrytitle"><a href="#SessionLockFile">SessionLockFile</a></span><span class="refpurpose"> — specify the name of a lock file if DBM-based sessions are used
</span></dt><dt><span class="refentrytitle"><a href="#SessionType">SessionType</a></span><span class="refpurpose"> — specify type of the user sessions database
</span></dt><dt><span class="refentrytitle"><a href="#SetGroup">SetGroup</a></span><span class="refpurpose"> — specify primary Unix group to switch to, after catalog to invoke is determined
</span></dt><dt><span class="refentrytitle"><a href="#Shipping">Shipping</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#ShowTimes">ShowTimes</a></span><span class="refpurpose"> — insert timing information in debug output
</span></dt><dt><span class="refentrytitle"><a href="#SocketFile">SocketFile</a></span><span class="refpurpose"> — specify Unix socket filename
</span></dt><dt><span class="refentrytitle"><a href="#SocketPerms">SocketPerms</a></span><span class="refpurpose"> — specify Unix socket permissions
</span></dt><dt><span class="refentrytitle"><a href="#SocketReadTimeout">SocketReadTimeout</a></span><span class="refpurpose"> — specify timeout on client sockets
</span></dt><dt><span class="refentrytitle"><a href="#SourceCookie">SourceCookie</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#SourcePriority">SourcePriority</a></span><span class="refpurpose"> — specify list of CGI variables to check for source (affiliate) name
</span></dt><dt><span class="refentrytitle"><a href="#SpecialPage">SpecialPage</a></span><span class="refpurpose"> — specify location of special pages
</span></dt><dt><span class="refentrytitle"><a href="#SpecialPageDir">SpecialPageDir</a></span><span class="refpurpose"> — specify directory containing special catalog pages
</span></dt><dt><span class="refentrytitle"><a href="#SpecialSub">SpecialSub</a></span><span class="refpurpose"> — specify Perl subroutines to handle certain events or conditions
</span></dt><dt><span class="refentrytitle"><a href="#StartServers">StartServers</a></span><span class="refpurpose"> — specify the number of Interchange servers to prefork when running in PreFork mode
</span></dt><dt><span class="refentrytitle"><a href="#StaticDir">StaticDir</a></span><span class="refpurpose"> — (obsolete) specify path of the directory which should be used as root for static pages
</span></dt><dt><span class="refentrytitle"><a href="#Sub">Sub</a></span><span class="refpurpose"> — define Perl functions for use within a catalog
</span></dt><dt><span class="refentrytitle"><a href="#SubCatalog">SubCatalog</a></span><span class="refpurpose"> — register subcatalog with the Interchange server
</span></dt><dt><span class="refentrytitle"><a href="#Suggest">Suggest</a></span><span class="refpurpose"> — check existence of a capability
</span></dt><dt><span class="refentrytitle"><a href="#SysLog">SysLog</a></span><span class="refpurpose"> — instruct Interchange to log to Unix system's log (syslog)
</span></dt><dt><span class="refentrytitle"><a href="#TableRestrict">TableRestrict</a></span><span class="refpurpose"> — restrict database searches to rows satisfying given criteria
</span></dt><dt><span class="refentrytitle"><a href="#TagDir">TagDir</a></span><span class="refpurpose"> — specify directories containing code declaration blocks
</span></dt><dt><span class="refentrytitle"><a href="#TagGroup">TagGroup</a></span><span class="refpurpose"> — group Interchange code declarations in groups, for later convenient inclusion or exclusion from the setup
</span></dt><dt><span class="refentrytitle"><a href="#TagInclude">TagInclude</a></span><span class="refpurpose"> — include (a group of) tags in Interchange
</span></dt><dt><span class="refentrytitle"><a href="#TaxInclusive">TaxInclusive</a></span><span class="refpurpose"> — display prices with tax amount included
</span></dt><dt><span class="refentrytitle"><a href="#TaxShipping">TaxShipping</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#TcpHost">TcpHost</a></span><span class="refpurpose"> — specify which hosts can connect to Interchange server running in Inet mode
</span></dt><dt><span class="refentrytitle"><a href="#TcpMap">TcpMap</a></span><span class="refpurpose"> — specify which ports should Interchange server running in Inet mode listen on
</span></dt><dt><span class="refentrytitle"><a href="#TemplateDir">TemplateDir</a></span><span class="refpurpose"> — specify common template/fallback "pages" directories
</span></dt><dt><span class="refentrytitle"><a href="#TolerateGet">TolerateGet</a></span><span class="refpurpose"> — specify whether information from both GET and POST method should be parsed when form is submitted using POST method
</span></dt><dt><span class="refentrytitle"><a href="#TrackDateFormat">TrackDateFormat</a></span><span class="refpurpose"> — specify time format used in TrackFile logs
</span></dt><dt><span class="refentrytitle"><a href="#TrackFile">TrackFile</a></span><span class="refpurpose"> — specify user tracking log filename
</span></dt><dt><span class="refentrytitle"><a href="#TrackPageParam">TrackPageParam</a></span><span class="refpurpose"> — insert specified variables' values in the user track file
</span></dt><dt><span class="refentrytitle"><a href="#TrustProxy">TrustProxy</a></span><span class="refpurpose"> — designate certain IP addresses or hostnames as trusted HTTP proxies
</span></dt><dt><span class="refentrytitle"><a href="#UTF8">UTF8</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="#Unix_Mode">Unix_Mode</a></span><span class="refpurpose"> — specify whether Interchange server should open an UNIX socket
</span></dt><dt><span class="refentrytitle"><a href="#UpsZoneFile">UpsZoneFile</a></span><span class="refpurpose"> — specify file containing region-specific UPS zone information
</span></dt><dt><span class="refentrytitle"><a href="#UrlSepChar">UrlSepChar</a></span><span class="refpurpose"> — specify default URL separator character
</span></dt><dt><span class="refentrytitle"><a href="#UseModifier">UseModifier</a></span><span class="refpurpose"> — specify default attributes that can be attached to items
</span></dt><dt><span class="refentrytitle"><a href="#UserControl">UserControl</a></span><span class="refpurpose"> — enable enhanced user database functions
</span></dt><dt><span class="refentrytitle"><a href="#UserDB">UserDB</a></span><span class="refpurpose"> — adjust default behavior of Interchange user database functions
</span></dt><dt><span class="refentrytitle"><a href="#UserDatabase">UserDatabase</a></span><span class="refpurpose"> — specify name of table to use as user database
</span></dt><dt><span class="refentrytitle"><a href="#UserTag">UserTag</a></span><span class="refpurpose"> — define an Interchange tag
</span></dt><dt><span class="refentrytitle"><a href="#UserTrack">UserTrack</a></span><span class="refpurpose"> — enable sending of X-Track HTTP header
</span></dt><dt><span class="refentrytitle"><a href="#ValuesDefault">ValuesDefault</a></span><span class="refpurpose"> — define default user values
</span></dt><dt><span class="refentrytitle"><a href="#VarName">VarName</a></span><span class="refpurpose"> — remap Interchange variables to arbitrary names in generated URLs
</span></dt><dt><span class="refentrytitle"><a href="#Variable">Variable</a></span><span class="refpurpose"> — define an Interchange variable
</span></dt><dt><span class="refentrytitle"><a href="#VariableDatabase">VariableDatabase</a></span><span class="refpurpose"> — specify database containing variables
</span></dt><dt><span class="refentrytitle"><a href="#VendURL">VendURL</a></span><span class="refpurpose"> — specify base URL of the Interchange catalog link program
</span></dt><dt><span class="refentrytitle"><a href="#WideOpen">WideOpen</a></span><span class="refpurpose"> — disable IP-based qualification of user sessions (the directive degrades catalog security!)
</span></dt><dt><span class="refentrytitle"><a href="#Windows">Windows</a></span><span class="refpurpose"> — (obsolete) indicate that Interchange is running under Microsoft Windows
</span></dt><dt><span class="refentrytitle"><a href="#WritePermission">WritePermission</a></span><span class="refpurpose"> — affect file mode (write permissions) on Interchange-generated files
</span></dt><dt><span class="refentrytitle"><a href="#XHTML">XHTML</a></span><span class="refpurpose"> — enable XHTML-conformant HTML output
</span></dt></dl></div></div><div class="refentry"><a id="AcceptRedirect"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AcceptRedirect — accept Web server redirects
</p></div><div class="refsect1"><a id="AcceptRedirect_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="AcceptRedirect_description"></a><h2>DESCRIPTION</h2><p>The directive
enables processing of HTTP server redirects, i.e. when handling ErrorDocument
for a Web server such as <a class="ulink" href="http://www.apache.org/" target="_top">Apache</a>. For instance, if your Apache
<code class="filename">httpd.conf</code> contains
</p><pre class="programlisting">
ErrorDocument 404 /cgi-bin/ic/standard
</pre><p>
then a request for <code class="literal">/somedir/index.html</code> that is not found
on the Web server would be resent to
<code class="literal">/cgi-bin/ic/standard/somedir/index.html</code>, and
would be indistinguishable from the static Web server-served page.
</p></div><div class="refsect1"><a id="AcceptRedirect_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="AcceptRedirect_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_AcceptRedirect_2666"></a><p class="title"><strong>Example: Enabling AcceptRedirect</strong></p><div class="example-contents"><pre class="programlisting">
AcceptRedirect Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AcceptRedirect_notes"></a><h2>NOTES</h2><p>Combined with the <code class="option">RedirectCache</code> directive, you can automatically
create missing <a href="glossary.html#HTML" class="olink">HTML</a> pages in your web server's static HTML space,
so that they <span class="bold"><strong>are</strong></span> found on next access.
Just beware; that turns them into static pages!
</p><p>
Although the idea seems attractive at first sight,
caution should be taken not to allow Web server's ErrorDocument redirection
to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> globally — it would render you subject to a
denial-of-service attack at random URLs (i.e. a flood of MS Windows
"Code Red" attacks). It is recommended that you enable it only for
specific directories, as <a class="ulink" href="http://www.apache.org/" target="_top">Apache</a> or another HTTP server would stand
much better up to such a "limited-scale" flood.
</p></div><div class="refsect1"><a id="AcceptRedirect_availability"></a><h2>AVAILABILITY</h2><p>AcceptRedirect is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AcceptRedirect_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_432_12021"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 432</strong></p><div class="figure-contents"><pre class="screen">
['AcceptRedirect', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12022"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AcceptRedirect_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AcceptRedirect_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RedirectCache" title="RedirectCache"><span class="citerefentry"><span class="refentrytitle">RedirectCache</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Accounting"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Accounting</p></div><div class="refsect1"><a id="Accounting_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="Accounting_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="Accounting_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Accounting_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="Accounting_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Accounting_availability"></a><h2>AVAILABILITY</h2><p>Accounting is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Accounting_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_704_12477"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 704</strong></p><div class="figure-contents"><pre class="screen">
['Accounting', 'locale', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3060__context_shows_lines_3060_3124__12478"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3060 (context shows lines 3060-3124)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_locale {
my($item,$settings) = @_;
return ($settings || '') unless $settings =~ /[^\d.]/;
$settings = '' if "\L$settings" eq 'default';
my $name;
my ($c, $store);
if(defined $C) {
$c = $C->{$item} || { };
$C->{$item . "_repository"} = {}
unless $C->{$item . "_repository"};
$store = $C->{$item . "_repository"};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
${"Global::$item" . "_repository"} = {}
unless ${"Global::$item" . "_repository"};
$store = ${"Global::$item" . "_repository"};
}
my ($eval, $safe);
if ($settings =~ s/^\s*([-\w.@]+)(?:\s+)?//) {
$name = $1;
undef $eval;
$settings =~ /^\s*{/
and $settings =~ /}\s*$/
and $eval = 1;
$eval and ! $safe and $safe = new Vend::Safe;
if(! defined $store->{$name} and $item eq 'Locale') {
my $past = POSIX::setlocale(POSIX::LC_ALL);
if(POSIX::setlocale(POSIX::LC_ALL, $name) ) {
$store->{$name} = POSIX::localeconv();
}
POSIX::setlocale(POSIX::LC_ALL, $past);
}
my($sethash);
if ($eval) {
$sethash = $safe->reval($settings)
or config_warn("bad Locale setting in %s: %s", $name, $@),
$sethash = {};
}
else {
$settings =~ s/^\s+//;
$settings =~ s/\s+$//;
$sethash = {};
%{$sethash} = Text::ParseWords::shellwords($settings);
}
$c = $store->{$name} || {};
my $nodefaults = delete $sethash->{MV_LOCALE_NO_DEFAULTS};
for (keys %{$sethash}) {
$c->{$_} = $sethash->{$_};
}
}
else {
config_error("Bad locale setting $settings.\n");
}
$C->{LastLocale} = $name if $C and $item eq 'Locale';
$store->{$name} = $c unless $store->{$name};
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Accounting_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Accounting_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AccumulateCode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AccumulateCode — fetch Interchange code on-demand from CodeRepository instead of starting up with everything
</p></div><div class="refsect1"><a id="AccumulateCode_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="AccumulateCode_description"></a><h2>DESCRIPTION</h2><p>The directive instructs <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to fetch code blocks "on-demand" from the
<code class="option">CodeRepository</code> instead of starting up with everything.
It helps speed up <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> startup time and reduce memory footprint.
</p><p>
So, at runtime, when particular functionality is needed but is not
yet present in the running <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> installation, it is copied from
<code class="option">CodeRepository</code> to
<code class="filename">$Global::TagDir/Accumulated/</code>
<span class="bold"><strong>and automatically activated</strong></span>.
Later, when you restart <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> the next time, these code blocks will be
found in the accumulated directory and loaded normally
(there will be no need to fetch them from <code class="option">CodeRepository</code>
again).
</p><p>
Over time, as you access pages and routines, a full set of tags
used by a <a href="glossary.html#catalog" class="olink">catalog</a>
will be copied to the accumulated directory, and you will then be
able to turn <code class="option">AccumulateCode</code> off.
(In fact, <code class="option">AccumulateCode</code> is recommended for development and should
really be turned off in production systems).
</p></div><div class="refsect1"><a id="AccumulateCode_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="AccumulateCode_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_AccumulateCode_2998"></a><p class="title"><strong>Example: Enabling AccumulateCode</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
AccumulateCode Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AccumulateCode_notes"></a><h2>NOTES</h2><p>See <code class="option">CodeRepository</code> for a complete discussion.
</p></div><div class="refsect1"><a id="AccumulateCode_availability"></a><h2>AVAILABILITY</h2><p>AccumulateCode is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AccumulateCode_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_429_12108"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 429</strong></p><div class="figure-contents"><pre class="screen">
['AccumulateCode', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12109"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AccumulateCode_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="AccumulateCode_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CodeRepository" title="CodeRepository"><span class="citerefentry"><span class="refentrytitle">CodeRepository</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AcrossLocks"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AcrossLocks — open real databases instead of fast dummy pointers
</p></div><div class="refsect1"><a id="AcrossLocks_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="AcrossLocks_description"></a><h2>DESCRIPTION</h2><p>All configured <a href="glossary.html#database" class="olink">database</a>s are opened every time an <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> page is
visited and enters processing. Opening a new database connection takes
time, so <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> provides fast dummy pointer to each database until the
database is actually used within the page.
</p><p>
Enabling this directive has the effect of disabling fast pointers
and always opening real <a href="glossary.html#database" class="olink">database</a>s.
</p></div><div class="refsect1"><a id="AcrossLocks_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="AcrossLocks_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_AcrossLocks_2979"></a><p class="title"><strong>Example: Enabling AcrossLocks</strong></p><div class="example-contents"><pre class="programlisting">
AcrossLocks yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AcrossLocks_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="AcrossLocks_availability"></a><h2>AVAILABILITY</h2><p>AcrossLocks is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AcrossLocks_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_482_12102"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 482</strong></p><div class="figure-contents"><pre class="screen">
['AcrossLocks', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12103"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AcrossLocks_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AcrossLocks_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ActionMap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ActionMap — modify existing or define custom Interchange actions
</p></div><div class="refsect1"><a id="ActionMap_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> action_name perl_subroutine </p></div></div><div class="refsect1"><a id="ActionMap_description"></a><h2>DESCRIPTION</h2><p>The directive allows creation of new (and modification of existing)
Interchange <a href="glossary.html#ActionMap" class="olink">ActionMap</a>s using <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> subroutines.
</p><p>
If the action does not return a <a href="glossary.html#true" class="olink">true</a> value, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> processing
will stop right there, allowing you to fully handle the request from
your action.
</p><p>
See <a href="glossary.html#ActionMap" class="olink">ActionMap</a> glossary entry for more explanation and the list
of built-in <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> actionmaps.
</p></div><div class="refsect1"><a id="ActionMap_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="ActionMap_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Replacing_the_Order_action_with_a_no_op_3184"></a><p class="title"><strong>Example: Replacing the Order action with a no-op</strong></p><div class="example-contents"><p>Put the following in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
ActionMap order sub { 1 }
</pre><p>
Since we effectively turned Order into a no-operation action, the usual
order link such as
<code class="code"><A HREF="[area order/nextpage]">Order</a></code>
would be equivalent to <code class="code">[page nextpage]Order (does nothing)</a></code>.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Splitting_a_request_into_action_map__page_name_and_arguments_3185"></a><p class="title"><strong>Example: Splitting a request into action map, page name and arguments</strong></p><div class="example-contents"><p>Here's an example of an actionmap "<code class="literal">test</code>" that translates
HTTP requests in form of <code class="literal">test/<em class="replaceable"><code>page</code></em>/<em class="replaceable"><code>arguments</code></em></code>
into actual page requests to <code class="literal">page.html</code> with optional <code class="literal">arguments</code>.
</p><p>
</p><pre class="programlisting">
ActionMap test <<EOA
sub {
my $url = shift;
# Remove actionmap name from the URL
$url =~ s:^test/+::i;
# Arguments are optional
if ($url =~ s:/+(.*)$::) {
$CGI->{mv_arg} = $1;
}
$CGI->{mv_nextpage} = $url;
return 1;
}
EOA
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ActionMap_notes"></a><h2>NOTES</h2><p>For an introduction to Action Maps, see <a href="glossary.html#ActionMap" class="olink">ActionMap</a> glossary entry.
</p><p>
The standard <code class="literal">process</code> ActionMap has a number of
configuration settings which can be controlled through <code class="option">FormAction</code>.
</p><p>
In the past, global <a href="glossary.html#ActionMap" class="olink">ActionMap</a>s had the action name stripped from the
HTTP path. Beginning with <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> 5.5, catalog and global <a href="glossary.html#ActionMap" class="olink">ActionMap</a>s are
consistent in behavior and do not strip action name from the path.
</p></div><div class="refsect1"><a id="ActionMap_availability"></a><h2>AVAILABILITY</h2><p>ActionMap is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ActionMap_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_464_12157"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 464</strong></p><div class="figure-contents"><pre class="screen">
['ActionMap', 'action', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_535_12158"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 535</strong></p><div class="figure-contents"><pre class="screen">
['ActionMap', 'action', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2152__context_shows_lines_2152_2249__12159"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2152 (context shows lines 2152-2249)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_action {
my ($var, $value, $mapped) = @_;
if (! $value) {
return $InitializeEmpty{$var} ? '' : {};
}
return if $Vend::ExternalProgram;
my $c;
if($mapped) {
$c = $mapped;
}
elsif(defined $C) {
$c = $C->{$var} ||= {};
}
else {
no strict 'refs';
$c = ${"Global::$var"} ||= {};
}
if (defined $C and ! $c->{_mvsafe}) {
my $calc = Vend::Interpolate::reset_calc();
$c->{_mvsafe} = $calc;
}
my ($name, $sub) = split /\s+/, $value, 2;
$name =~ s/-/_/g;
## Determine if we are in a catalog config, and if
## perl should be global and/or strict
my $nostrict;
my $perlglobal = 1;
if($C) {
$nostrict = $Global::PerlNoStrict->{$C->{CatalogName}};
$perlglobal = $Global::AllowGlobal->{$C->{CatalogName}};
}
# Untaint and strip this pup
$sub =~ s/^\s*((?s:.)*\S)\s*//;
$sub = $1;
if($sub !~ /\s/) {
no strict 'refs';
if($sub =~ /::/ and ! $C) {
$c->{$name} = \&{"$sub"};
}
else {
if($C and $C->{Sub}) {
$c->{$name} = $C->{Sub}{$sub};
}
if(! $c->{$name} and $Global::GlobalSub) {
$c->{$name} = $Global::GlobalSub->{$sub};
}
}
if(! $c->{$name} and $AllowScalarAction{$var}) {
$c->{$name} = $sub;
}
elsif(! $c->{$name}) {
$@ = errmsg("Mapped %s action routine '%s' is non-existent.", $var, $sub);
}
}
elsif ( ! $mapped and $sub !~ /^sub\b/) {
if($AllowScalarAction{$var}) {
$c->{$name} = $sub;
}
else {
my $code = <<EOF;
sub {
return Vend::Interpolate::interpolate_html(<<EndOfThisHaiRYTHING);
$sub
EndOfThisHaiRYTHING
}
EOF
$c->{$name} = eval $code;
}
}
elsif ($perlglobal) {
package Vend::Interpolate;
if($nostrict) {
no strict;
$c->{$name} = eval $sub;
}
else {
$c->{$name} = eval $sub;
}
}
else {
package Vend::Interpolate;
$c->{$name} = $c->{_mvsafe}->reval($sub);
}
if($@) {
config_warn("Action '%s' did not compile correctly (%s).", $name, $@);
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ActionMap_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ActionMap_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AddDirective" title="AddDirective"><span class="citerefentry"><span class="refentrytitle">AddDirective</span>(7ic)</span></a>, <a class="link" href="#UserTag" title="UserTag"><span class="citerefentry"><span class="refentrytitle">UserTag</span>(7ic)</span></a>, <a class="link" href="#CodeDef" title="CodeDef"><span class="citerefentry"><span class="refentrytitle">CodeDef</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AddDirective"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AddDirective — add a new configuration directive
</p></div><div class="refsect1"><a id="AddDirective_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directive_name</code></em> [<em class="replaceable"><code>parse_function_name</code></em>
[<em class="replaceable"><code>default_value</code></em>]]</p></div></div><div class="refsect1"><a id="AddDirective_description"></a><h2>DESCRIPTION</h2><p>This directive allows you to extend the set of regular
<a href="glossary.html#configuration" class="olink">configuration</a>
directives accepted in each <code class="filename">catalog.cfg</code>. The added
directives are then treated the same as the existing "built-ins".
</p><p>
Three standard arguments can be specified: the
<code class="literal">directive_name</code>,
<code class="literal">parse_function_name</code> and
<code class="literal">default_value</code>.
</p><p>
If the parse function is not defined (either by omitting it or
literally specifying <code class="literal">undef</code>), then no parser
will be called on the value at all,
and the value of the directive will be exactly what users specify in their
config files (which will usually be <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> scalar values). If the parser
argument <span class="emphasis"><em>is</em></span> supplied, then the requested parser function
must already be defined because it can't be referenced
<span class="emphasis"><em>in advance</em></span>. It can be defined either as a
<code class="option">Sub</code> or <code class="option">GlobalSub</code> block, or can refer to an existing parser
function from <code class="filename">lib/Vend/Config.pm</code>.
The file <code class="filename">lib/Vend/Config.pm</code> contains all the default
parser functions, which are recognized by the mandatory prefix
<code class="literal">parse_</code>. (You do not, however, include
<code class="literal">parse_</code> in the <code class="literal">parse_function_name</code>.)
</p><p>
The <code class="literal">default_value</code> is optional.
</p><p>
Directly modifying <code class="filename">Config.pm</code> (or any other
files from the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> installation) is discouraged for portability
reasons. Therefore, to add a custom parsing function, you should
modify <code class="filename">interchange.cfg</code> as seen in <a class="xref" href="#AddDirective_examples" title="EXAMPLES">the section called “EXAMPLES”</a>
(note again that the parser definition
must logically come before <code class="option">AddDirective</code>).
</p></div><div class="refsect1"><a id="AddDirective_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="AddDirective_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Adding_a_new_catalog_configuration_directive_with_a_custom_parse_routine_2919"></a><p class="title"><strong>Example: Adding a new catalog configuration directive with a custom parse routine</strong></p><div class="example-contents"><p>Let's add the <code class="literal">DocRoot</code> directive. Put the following
in your <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
GlobalSub <<EOS
sub declare_extra_config {
package Vend::Config;
sub parse_docroot {
my ($var, $value) = @_;
unless ( -d $value ) { $@ = errmsg("Directory $value: $!") }
if ($@) { config_warn($@) }
return;
}
}
EOS
AddDirective DocRoot docroot "/var/www"
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Adding_the__Swish__directive_with_an_existing_parse_routine_2920"></a><p class="title"><strong>Example: Adding the "Swish" directive with an existing parse routine</strong></p><div class="example-contents"><pre class="programlisting">
Require module Vend::Swish
Variable swish Vend::Swish
AddDirective Swish hash
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AddDirective_notes"></a><h2>NOTES</h2><p>Note that <code class="literal">boolean</code>, one of the default parse functions, is
actually
a boolean list, and not a true boolean value. The list achieves the effect
of being boolean by logically returning <a href="glossary.html#true" class="olink">true</a> or <a href="glossary.html#false" class="olink">false</a>,
depending on whether the searched item is present in the list or not.
True boolean values are called "<code class="literal">yesno</code>"s in <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> parlance.
</p><p>
Please see the <a href="glossary.html#configuration" class="olink">configuration</a> glossary entry for a discussion
on config directives.
</p></div><div class="refsect1"><a id="AddDirective_availability"></a><h2>AVAILABILITY</h2><p>AddDirective is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AddDirective_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_498_12090"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 498</strong></p><div class="figure-contents"><pre class="screen">
['AddDirective', 'directive', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2913__context_shows_lines_2913_2930__12091"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2913 (context shows lines 2913-2930)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_directive {
my($name, $val) = @_;
return '' unless $val;
my($dir, $parser, $default) = split /\s+/, $val, 3 ;
if(! defined &{"parse_$parser"} and ! defined &{"$parser"}) {
if (defined $Global::GlobalSub->{"parse_$parser"}) {
no strict 'refs';
*{"Vend::Config::parse_$parser"} = $Global::GlobalSub->{"parse_$parser"};
} else {
$parser = undef;
}
}
$default = '' if ! $default or $default eq 'undef';
$Global::AddDirective = [] unless $Global::AddDirective;
push @$Global::AddDirective, [ $dir, $parser, $default ];
return $Global::AddDirective;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AddDirective_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AddDirective_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DeleteDirective" title="DeleteDirective"><span class="citerefentry"><span class="refentrytitle">DeleteDirective</span>(7ic)</span></a>, <a class="link" href="#ActionMap" title="ActionMap"><span class="citerefentry"><span class="refentrytitle">ActionMap</span>(7ic)</span></a>, <a class="link" href="#Replace" title="Replace"><span class="citerefentry"><span class="refentrytitle">Replace</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AdminSub"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AdminSub — restrict specific global subroutines to catalogs listed under AllowGlobal directive
</p></div><div class="refsect1"><a id="AdminSub_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>subroutine_name</code></em>... </p></div></div><div class="refsect1"><a id="AdminSub_description"></a><h2>DESCRIPTION</h2><p>Restrict usage of specified global subroutines to <a href="glossary.html#catalog" class="olink">catalog</a>s
listed under the <code class="option">AllowGlobal</code> directive.
</p><p>
If AdminSub is unspecified, all global subroutines can be used by
all catalogs.
</p></div><div class="refsect1"><a id="AdminSub_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="AdminSub_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_AdminSub_3735"></a><p class="title"><strong>Example: Defining AdminSub</strong></p><div class="example-contents"><pre class="programlisting">
AdminSub dangerous1 dangerous2
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AdminSub_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="AdminSub_availability"></a><h2>AVAILABILITY</h2><p>AdminSub is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AdminSub_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_648_12313"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 648</strong></p><div class="figure-contents"><pre class="screen">
['AdminSub', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12314"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AdminSub_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AdminSub_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AllowGlobal" title="AllowGlobal"><span class="citerefentry"><span class="refentrytitle">AllowGlobal</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AdminUser"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AdminUser — (obsolete) specify usernames that are given full access to all catalogs, regardless of any permissions
</p></div><div class="refsect1"><a id="AdminUser_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>username</code></em>:<em class="replaceable"><code>crypted_password</code></em>
... </p></div></div><div class="refsect1"><a id="AdminUser_description"></a><h2>DESCRIPTION</h2><p>Username and password pairs which are given administrator
privileges to all catalogs.
</p><p>
Passwords are encrypted using standard Unix <a href="glossary.html#crypt" class="olink">crypt</a>.
</p><p>
This functionality is standalone —
you do not need to have the users present in the <a href="glossary.html#UserDB" class="olink">UserDB</a> or the
access <a href="glossary.html#database" class="olink">database</a>.
</p></div><div class="refsect1"><a id="AdminUser_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="AdminUser_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_AdminUser_3012"></a><p class="title"><strong>Example: Setting AdminUser</strong></p><div class="example-contents"><p>An example with username "thunder" and password "rolls":</p><pre class="programlisting">
AdminUser thunder:H0NJOAxjci1Lw
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AdminUser_notes"></a><h2>NOTES</h2><p>The AdminUser functionality is considered to be flawed,
see <a class="ulink" href="http://www.icdevgroup.org/pipermail/interchange-users/2010-March/051763.html" target="_top">this mailing list post</a> for more information.
</p><p>
This directive has been removed in <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> 5.7 (Mar 11, 2010).
</p></div><div class="refsect1"><a id="AdminUser_availability"></a><h2>AVAILABILITY</h2><p>AdminUser is available in Interchange versions:
</p><p>
4.6.0-5.6.0</p></div><div class="refsect1"><a id="AdminUser_source"></a><h2>SOURCE</h2><p>Interchange 5.6.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_500_10811"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm?only_with_tag=STABLE_5_6-root" target="_top">lib/Vend/Config.pm</a> <br />Line 500</strong></p><div class="figure-contents"><pre class="screen">
['AdminUser', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AdminUser_authors"></a><h2>AUTHORS</h2><p></p></div><div class="refsect1"><a id="AdminUser_seeAlso"></a><h2>SEE ALSO</h2><p><a href="vars.html#MV_NO_CRYPT" class="olink"><span class="citerefentry"><span class="refentrytitle">MV_NO_CRYPT</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AliasTable"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AliasTable — specify table containing page aliases ("redirect" instructions)
</p></div><div class="refsect1"><a id="AliasTable_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>table_name</code></em> </p></div></div><div class="refsect1"><a id="AliasTable_description"></a><h2>DESCRIPTION</h2><p>The directive specifies Interchange <a href="glossary.html#table" class="olink">table</a> that
contains page aliases (default table name is
<span class="database">alias</span>).
</p><p>
This way, <a href="glossary.html#flypage" class="olink">flypage</a>s can be aliased and redirected to different locations
without performing file lookup cycles.
</p><p>
Primary applications include content management and creation of
pseudo-paths. See <a class="xref" href="#AliasTable_examples" title="EXAMPLES">the section called “EXAMPLES”</a>.
</p></div><div class="refsect1"><a id="AliasTable_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="AliasTable_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_AliasTable_3932"></a><p class="title"><strong>Example: Defining AliasTable</strong></p><div class="example-contents"><pre class="programlisting">
Database alias alias.txt TAB
AliasTable alias
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Creating_AliasTable_database_3933"></a><p class="title"><strong>Example: Creating AliasTable database</strong></p><div class="example-contents"><pre class="programlisting">
base_page real_page
4595 index
</pre><p>
In our example, page <code class="literal">4595</code>.html redirects
back to the index page.
</p><p>
You might notice that the field names and
values above are not properly aligned. This is the nature of
<a href="glossary.html#tab-delimited" class="olink">tab delimited</a> files.
</p><p>
To minimize the chance of confusion, you can download properly composed
example file <a class="ulink" href="files/various/alias.txt" target="_top">alias.txt</a>.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="AliasTable_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="AliasTable_availability"></a><h2>AVAILABILITY</h2><p>AliasTable is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AliasTable_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_620_12359"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 620</strong></p><div class="figure-contents"><pre class="screen">
['AliasTable', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AliasTable_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AliasTable_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AllowGlobal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AllowGlobal — specify catalogs allowed to operate with full Interchange server permissions
</p></div><div class="refsect1"><a id="AllowGlobal_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>catalog</code></em>... </p></div></div><div class="refsect1"><a id="AllowGlobal_description"></a><h2>DESCRIPTION</h2><p>Specify catalogs allowed to operate with the full permissions of the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server.
</p><p>
Don't use this directive unless the catalog is completely trusted.
</p></div><div class="refsect1"><a id="AllowGlobal_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="AllowGlobal_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_AllowGlobal_2747"></a><p class="title"><strong>Example: Defining AllowGlobal</strong></p><div class="example-contents"><pre class="programlisting">
AllowGlobal tutorial1 tutorial2
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AllowGlobal_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="AllowGlobal_availability"></a><h2>AVAILABILITY</h2><p>AllowGlobal is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AllowGlobal_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_495_12045"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 495</strong></p><div class="figure-contents"><pre class="screen">
['AllowGlobal', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12046"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AllowGlobal_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AllowGlobal_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#GlobalSub" title="GlobalSub"><span class="citerefentry"><span class="refentrytitle">GlobalSub</span>(7ic)</span></a>, <a class="link" href="#AdminSub" title="AdminSub"><span class="citerefentry"><span class="refentrytitle">AdminSub</span>(7ic)</span></a>, <a class="link" href="#Sub" title="Sub"><span class="citerefentry"><span class="refentrytitle">Sub</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AllowRemoteSearch"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AllowRemoteSearch — specify database tables accessible for remote searches
</p></div><div class="refsect1"><a id="AllowRemoteSearch_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>table_name</code></em>... </p></div></div><div class="refsect1"><a id="AllowRemoteSearch_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="AllowRemoteSearch_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="AllowRemoteSearch_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="AllowRemoteSearch_notes"></a><h2>NOTES</h2><p>Any table specified in this option will be remotely searchable, and you should
not permit any table with sensitive information to be searched in this way. You
should carefully consider the implications of adding any further tables to this
configuration option.
</p></div><div class="refsect1"><a id="AllowRemoteSearch_availability"></a><h2>AVAILABILITY</h2><p>AllowRemoteSearch is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AllowRemoteSearch_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_617_12445"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 617</strong></p><div class="figure-contents"><pre class="screen">
['AllowRemoteSearch', 'array_complete', 'products variants options'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3813__context_shows_lines_3813_3826__12446"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3813 (context shows lines 3813-3826)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_array_complete {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c = [];
for (@setting) {
check_legal($item, $_);
push @{$c}, $_;
}
$c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AllowRemoteSearch_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AllowRemoteSearch_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AlwaysSecure"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AlwaysSecure — specify pages that are always to be served over a HTTPS connection
</p></div><div class="refsect1"><a id="AlwaysSecure_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>page_path</code></em>... </p></div></div><div class="refsect1"><a id="AlwaysSecure_description"></a><h2>DESCRIPTION</h2><p>The directive specifies <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> pages that are always to be served over a
secure (HTTPS) connection.
</p></div><div class="refsect1"><a id="AlwaysSecure_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="AlwaysSecure_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_AlwaysSecure_4353"></a><p class="title"><strong>Example: Specifying AlwaysSecure</strong></p><div class="example-contents"><pre class="programlisting">
AlwaysSecure ord/checkout
AlwaysSecure <<EOD
change_password
login
member/account
ord/billing
ord/checkout
ord/finalize
ord/multi
ord/shipping
query/order_detail
EOD
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AlwaysSecure_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="AlwaysSecure_availability"></a><h2>AVAILABILITY</h2><p>AlwaysSecure is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AlwaysSecure_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_646_12459"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 646</strong></p><div class="figure-contents"><pre class="screen">
['AlwaysSecure', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12460"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AlwaysSecure_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AlwaysSecure_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ExtraSecure" title="ExtraSecure"><span class="citerefentry"><span class="refentrytitle">ExtraSecure</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AsciiTrack"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AsciiTrack — specify filename to which formatted order reports should be appended
</p></div><div class="refsect1"><a id="AsciiTrack_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="AsciiTrack_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the filename to which formatted orders will be appended.
</p></div><div class="refsect1"><a id="AsciiTrack_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="AsciiTrack_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_AsciiTrack_3660"></a><p class="title"><strong>Example: Setting AsciiTrack</strong></p><div class="example-contents"><pre class="programlisting">
AsciiTrack etc/tracking.asc
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AsciiTrack_notes"></a><h2>NOTES</h2><p>If the <code class="option">Route</code> directive is set to "<code class="literal">supplant</code>", this
directive is ignored.
</p></div><div class="refsect1"><a id="AsciiTrack_availability"></a><h2>AVAILABILITY</h2><p>AsciiTrack is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AsciiTrack_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_672_12296"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 672</strong></p><div class="figure-contents"><pre class="screen">
['AsciiTrack', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AsciiTrack_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AsciiTrack_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#SendMailProgram" title="SendMailProgram"><span class="citerefentry"><span class="refentrytitle">SendMailProgram</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AutoEnd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AutoEnd — specify macro to be executed automatically at the end of every page access
</p></div><div class="refsect1"><a id="AutoEnd_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>macro</code></em> </p></div></div><div class="refsect1"><a id="AutoEnd_description"></a><h2>DESCRIPTION</h2><p>Specify an Interchange <a href="glossary.html#macro" class="olink">macro</a> to be invoked automatically, at the end of every
page access. This step is performed after all page parsing occurs,
just before the whole transaction ends.
</p><p>
Except for the time of execution, it behaves the same as its closely related
directive <code class="option">Autoload</code>.
</p></div><div class="refsect1"><a id="AutoEnd_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="AutoEnd_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="AutoEnd_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="AutoEnd_availability"></a><h2>AVAILABILITY</h2><p>AutoEnd is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AutoEnd_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_592_12451"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 592</strong></p><div class="figure-contents"><pre class="screen">
['AutoEnd', 'routine_array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3777__context_shows_lines_3777_3811__12452"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3777 (context shows lines 3777-3811)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_routine_array {
my($item,$settings) = @_;
return '' unless $settings;
my $c;
if(defined $C) {
$c = $C->{$item};
}
else {
no strict 'refs';
$c = ${"Global::$item"};
}
my @mac;
if($settings =~ /^[-\s\w,]+$/) {
@mac = grep /\S/, split /[\s,]+/, $settings;
}
else {
push @mac, $settings;
}
if(ref($c) eq 'ARRAY') {
push @$c, @mac;
}
elsif($c) {
$c = [$c, @mac];
}
else {
$c = scalar(@mac) > 1 ? [ @mac ] : $mac[0];
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AutoEnd_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AutoEnd_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Autoload" title="Autoload"><span class="citerefentry"><span class="refentrytitle">Autoload</span>(7ic)</span></a>, <a class="link" href="#Preload" title="Preload"><span class="citerefentry"><span class="refentrytitle">Preload</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AutoModifier"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AutoModifier — specify products table columns containing values for product attributes
</p></div><div class="refsect1"><a id="AutoModifier_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>[<em class="replaceable"><code>name</code></em>=] [<em class="replaceable"><code>table</code></em>:]<em class="replaceable"><code>column</code></em> [:<em class="replaceable"><code>key</code></em>]
... </p></div></div><div class="refsect1"><a id="AutoModifier_description"></a><h2>DESCRIPTION</h2><p>The directive specifies names of the product <a href="glossary.html#attribute" class="olink">attribute</a>s
which should be automatically loaded from table columns.
Table, column and key identifiers belonging to a single specification
are separated by a colon (<code class="literal">:</code>), while multiple specifications
are separated by whitespace.
</p><p>
In other words,
when an item is added to the shopping cart using <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>'s routines, the
attributes declared in <code class="option">AutoModifier</code> will be set to the values of the
fields in the <span class="database">products</span> database.
</p><p>
This facility will often be employed in determining product
<a href="glossary.html#price" class="olink">price</a>, <a href="glossary.html#discount" class="olink">discount</a>, <a href="glossary.html#tax" class="olink">tax</a> and <a href="glossary.html#shipping" class="olink">shipping</a>, and
other custom attributes; these attributes will probably
be used in custom <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> code that will scan the electronic
<a href="glossary.html#cart" class="olink">cart</a> contents and perform decisions. For example, by defining
columns <span class="database">heavy</span> and
<span class="database">downloadable</span>, you will be
able to perform decisions
based on <code class="code">$item->{heavy}</code> and
<code class="code">$item->{downloadable}</code> (but there are more access methods,
see the <a href="glossary.html#attribute" class="olink">attribute</a> glossary entry).
</p></div><div class="refsect1"><a id="AutoModifier_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="AutoModifier_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_AutoModifier_4423"></a><p class="title"><strong>Example: Specifying AutoModifier</strong></p><div class="example-contents"><p>To set whether an item is defined as "heavy" and requires truck shipment, or
is "downloadable", set:</p><pre class="programlisting">
AutoModifier heavy downloadable
</pre><p>
Also make sure to have the
<span class="database">heavy</span> and
<span class="database">downloadable</span> columns defined in your
<span class="database">products</span> database.
</p></div></div><br class="example-break" /><div class="example"><a id="example_set_attribute__heavy__from_table__inventory__4424"></a><p class="title"><strong>Example: set attribute 'heavy' from table 'inventory'</strong></p><div class="example-contents"><pre class="programlisting">
AutoModifier inventory:heavy
</pre></div></div><br class="example-break" /><div class="example"><a id="example_set_attribute__weighty__from_table__inventory___column__heavy__4425"></a><p class="title"><strong>Example: set attribute 'weighty' from table 'inventory', column 'heavy'</strong></p><div class="example-contents"><pre class="programlisting">
AutoModifier weighty=inventory:heavy
</pre></div></div><br class="example-break" /><div class="example"><a id="example_set_attribute__heavy__from_table__inventory___with_a_different_SKU_4426"></a><p class="title"><strong>Example: set attribute 'heavy' from table 'inventory', with a different SKU</strong></p><div class="example-contents"><pre class="programlisting">
AutoModifier inventory:heavy:mv_sku
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AutoModifier_notes"></a><h2>NOTES</h2><p>This can useful when doing shipping calculations or in embedded
<a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> code that works on item attributes.
</p><p>
See <a href="glossary.html#attribute" class="olink">attribute</a> for a complete introduction to item attributes.
</p></div><div class="refsect1"><a id="AutoModifier_availability"></a><h2>AVAILABILITY</h2><p>AutoModifier is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AutoModifier_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_631_12475"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 631</strong></p><div class="figure-contents"><pre class="screen">
['AutoModifier', 'array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3755__context_shows_lines_3755_3775__12476"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3755 (context shows lines 3755-3775)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_array {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || [];
}
else {
no strict 'refs';
$c = ${"Global::$item"} || [];
}
for (@setting) {
check_legal($item, $_);
push @{$c}, $_;
}
$c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AutoModifier_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AutoModifier_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#UseModifier" title="UseModifier"><span class="citerefentry"><span class="refentrytitle">UseModifier</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="AutoVariable"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AutoVariable — specify config directives to make available through the Variable space
</p></div><div class="refsect1"><a id="AutoVariable_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directive</code></em>... </p></div></div><div class="refsect1"><a id="AutoVariable_description"></a><h2>DESCRIPTION</h2><p>Specify list of <a href="glossary.html#configuration" class="olink">configuration</a> directives whose values are to be made
available through the <a href="glossary.html#variable" class="olink">variable</a> space.
This allows you to conveniently
write say, <code class="code">__<em class="replaceable"><code>DirectiveName</code></em>__</code>, and
retrieve the corresponding configuration directive's value.
</p><p>
To support <a href="glossary.html#scalar" class="olink">scalar</a>s, <a href="glossary.html#array" class="olink">array</a>s and <a href="glossary.html#hash" class="olink">hash</a>es of values (all
three basic <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> types), the syntax had to be extended a little. With
array or hash <a href="glossary.html#configuration" class="olink">configuration</a> directives, you need to append the index
number or hash key respectively.
See <a class="xref" href="#AutoVariable_examples" title="EXAMPLES">the section called “EXAMPLES”</a> for clarification.
</p><p>
Note that the behavior of <code class="option">AutoVariable</code> is not dynamic — you need
to re-invoke <code class="option">AutoVariable</code> every time you want to update the
value in <code class="code">__<em class="replaceable"><code>DirectiveName</code></em>__</code>.
</p></div><div class="refsect1"><a id="AutoVariable_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="AutoVariable_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_configuration_directives_through_Variable_space_2486"></a><p class="title"><strong>Example: Enabling configuration directives through Variable space</strong></p><div class="example-contents"><p>Put the following in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
VendURL http://myhost.mydomain.local/cgi-bin/ic/catalog
SecureURL https://myhost.mydomain.local/cgi-bin/ic/catalog
MailOrderTo root@mydomain.local
SafeUntrap sort
SysLog command /usr/bin/logger
AutoVariable VendURL SecureURL MailOrderTo SafeUnutrap SysLog
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Displaying_a_scalar_value_2487"></a><p class="title"><strong>Example: Displaying a scalar value</strong></p><div class="example-contents"><p>Put the following on a page:</p><pre class="programlisting">
Orders are e-mailed to: __MailOrderTo__
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Displaying_an_array_value_2488"></a><p class="title"><strong>Example: Displaying an array value</strong></p><div class="example-contents"><p>Put the following on a page:</p><pre class="programlisting">
First SafeUntrap value is: __SafeUntrap_0__
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Display_a_hash_value_2489"></a><p class="title"><strong>Example: Display a hash value</strong></p><div class="example-contents"><p>Put the following on a page:</p><pre class="programlisting">
Syslog command is: __SysLog_command__
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="AutoVariable_notes"></a><h2>NOTES</h2><p>The directive does not support <a href="glossary.html#hash" class="olink">hash</a> keys that contain non-word
characters or whitespace. In addition, only the first-level of array and hash
indices/keys is translated properly.
</p></div><div class="refsect1"><a id="AutoVariable_availability"></a><h2>AVAILABILITY</h2><p>AutoVariable is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="AutoVariable_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_514_11971"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 514</strong></p><div class="figure-contents"><pre class="screen">
['AutoVariable', 'autovar', 'UrlJoiner'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_707_11972"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 707</strong></p><div class="figure-contents"><pre class="screen">
['AutoVariable', 'autovar', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2541__context_shows_lines_2541_2572__11973"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2541 (context shows lines 2541-2572)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_autovar {
my($var, $val) = @_;
return '' if ! $val;
my @dirs = grep /\w/, split /[\s,\0]+/, $val;
my $name;
foreach $name (@dirs) {
next unless $name =~ /^\w+$/;
my $val = get_directive($name);
if(! ref $val) {
parse_variable('Variable', "$name $val");
}
elsif ($val =~ /ARRAY/) {
for(my $i = 0; $i < @$val; $i++) {
my $an = "${name}_$i";
parse_variable('Variable', "$an $val->[$i]");
}
}
elsif ($val =~ /HASH/) {
my ($k, $v);
while ( ($k, $v) = each %$val) {
next unless $k =~ /^\w+$/;
parse_variable('Variable', "$k $v");
}
}
else {
config_warn('%s directive not parsable by AutoVariable', $name);
}
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="AutoVariable_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="AutoVariable_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#base-url" class="olink"><span class="citerefentry"><span class="refentrytitle">base-url</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Autoload"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Autoload — specify actions to be executed automatically at the beginning of every page access
</p></div><div class="refsect1"><a id="Autoload_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>subroutine_name_or_ITL_code</code></em>... </p></div></div><div class="refsect1"><a id="Autoload_description"></a><h2>DESCRIPTION</h2><p>Specify actions (in form of <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> subroutines or <a href="glossary.html#ITL" class="olink">ITL</a> tags)
that are to be invoked automatically, on every
page access. This step is performed before any page parsing occurs,
and before the action or page is even determined.
</p><p>
The directive can be set to the name of a subroutine (<code class="option">Sub</code> or
<code class="option">GlobalSub</code>), or to a string containing <a href="glossary.html#ITL" class="olink">ITL</a> tags.
The return value from the code run is discarded.
</p></div><div class="refsect1"><a id="Autoload_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Autoload_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Simple_Autoload_example_3970"></a><p class="title"><strong>Example: Simple Autoload example</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
GlobalSub <<EOR
sub simple_gsub {
open OUT, "> /tmp/out";
print OUT scalar localtime, "\n";
close OUT;
}
EOR
</pre><p>
Put the following in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
Autoload simple_gsub
</pre><p>
Now, at each page visit, the file <code class="filename">/tmp/out</code> will
contain the access time. This example is pretty useless and does not
convey good programming practice (the file opening part), but it does
show a practical, stand-alone example.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Redirect_page_accesses_3971"></a><p class="title"><strong>Example: Redirect page accesses</strong></p><div class="example-contents"><p>Let's say that a new page visit is "triggered" as a result of users
submitting a <a href="glossary.html#HTML" class="olink">HTML</a> form. At that point, <code class="mv">mv_nextpage</code>
contains the name of the page to display next, of course.
</p><p>
The following would redirect all accesses from
directory <code class="filename">public/</code> to
directory <code class="filename">private/</code>:</p><pre class="programlisting">
Autoload [perl] $CGI->{mv_nextpage} =~ s:^public/:private/:; [/perl]
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Temporary_change_of_configuration_directives_3972"></a><p class="title"><strong>Example: Temporary change of configuration directives</strong></p><div class="example-contents"><p>As you might know, on each page access, all catalog
<a href="glossary.html#configuration" class="olink">configuration</a> directives (global and catalog) are "re-instantiated",
and valid for the current page. This particularly convenient feature
allows us to change (modify, add or delete) configuration directives
as we see fit on a per-page basis,
without worrying about them being persistent, and consequently,
even without the need to re-set them back to original values.
</p><p>
The following example (put in <code class="filename">catalog.cfg</code>) displays a different flypage for
Opera web browsers:</p><pre class="programlisting">
Autoload <<EOA
[perl]
if ($Session->{browser} =~ /opera/i) {
$Config->{Special}->{flypage} = 'opera_flypage';
}
[/perl]
EOA
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Autoload_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Autoload_availability"></a><h2>AVAILABILITY</h2><p>Autoload is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Autoload_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_591_12366"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 591</strong></p><div class="figure-contents"><pre class="screen">
['Autoload', 'routine_array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3777__context_shows_lines_3777_3811__12367"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3777 (context shows lines 3777-3811)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_routine_array {
my($item,$settings) = @_;
return '' unless $settings;
my $c;
if(defined $C) {
$c = $C->{$item};
}
else {
no strict 'refs';
$c = ${"Global::$item"};
}
my @mac;
if($settings =~ /^[-\s\w,]+$/) {
@mac = grep /\S/, split /[\s,]+/, $settings;
}
else {
push @mac, $settings;
}
if(ref($c) eq 'ARRAY') {
push @$c, @mac;
}
elsif($c) {
$c = [$c, @mac];
}
else {
$c = scalar(@mac) > 1 ? [ @mac ] : $mac[0];
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Autoload_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Autoload_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AutoEnd" title="AutoEnd"><span class="citerefentry"><span class="refentrytitle">AutoEnd</span>(7ic)</span></a>, <a class="link" href="#Preload" title="Preload"><span class="citerefentry"><span class="refentrytitle">Preload</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="BounceReferrals"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>BounceReferrals — remove visible affiliate code from URLs after first access
</p></div><div class="refsect1"><a id="BounceReferrals_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="BounceReferrals_description"></a><h2>DESCRIPTION</h2><p>When <code class="option">BounceReferrals</code> is enabled, <a href="glossary.html#GET" class="olink">GET</a> requests to URLs with
<code class="mv">mv_pc</code> or <code class="mv">mv_source</code> set to an affiliate code are redirected
to the same URL minus the affiliate code.
</p><p>
This keeps search engines that respect redirects from storing the affiliate
code-salted URLs in their indexes, and helps them focus on the real resource
with a single URL instead of a multitude of salted links.
</p></div><div class="refsect1"><a id="BounceReferrals_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="BounceReferrals_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_BounceReferrals_3868"></a><p class="title"><strong>Example: Enabling BounceReferrals</strong></p><div class="example-contents"><pre class="programlisting">
BounceReferrals yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="BounceReferrals_notes"></a><h2>NOTES</h2><p>When this directive is enabled and visitors do not already have a session
<a href="glossary.html#cookie" class="olink">cookie</a> (the most common case on first access), they are bounced to an URL
that does not have the affiliate code but has the <a href="glossary.html#session" class="olink">session</a> ID.
There's no easy way around this, and we consider it a separate issue from the
<code class="option">BounceReferrals</code> concept.
If session IDs in URLs are a concern, they'll need a separate solution.
</p><p>
Historically, many application servers always bounced the first request
to check for <a href="glossary.html#cookie" class="olink">cookie</a> support. Nowadays, many simply require cookies for
anything that needs a session. <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> is different on both counts.
</p></div><div class="refsect1"><a id="BounceReferrals_availability"></a><h2>AVAILABILITY</h2><p>BounceReferrals is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="BounceReferrals_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_716_12344"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 716</strong></p><div class="figure-contents"><pre class="screen">
['BounceReferrals', 'yesno', 'no'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12345"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="BounceReferrals_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="BounceReferrals_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="BounceReferralsRobot"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>BounceReferralsRobot — <span class="inlinemediaobject"><img src="./images/new.png" /></span>
remove visible affiliate code from URLs after first access (for robots only)
</p></div><div class="refsect1"><a id="BounceReferralsRobot_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="BounceReferralsRobot_description"></a><h2>DESCRIPTION</h2><p>This directive is similar to <code class="option">BounceReferrals</code> but it
takes effect only on URLs accessed by robots.
</p></div><div class="refsect1"><a id="BounceReferralsRobot_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="BounceReferralsRobot_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_BounceReferralsRobot_12516"></a><p class="title"><strong>Example: Enabling BounceReferralsRobot</strong></p><div class="example-contents"><pre class="programlisting">
BounceReferralsRobot yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="BounceReferralsRobot_notes"></a><h2>NOTES</h2><p>This is useful for Google Analytics, Omniture SiteCatalyst, and
similar analytics that need to see the referrals in the URL, and
doesn't hurt anything for most users because redirecting away from
the referral is most important for SEO.
</p></div><div class="refsect1"><a id="BounceReferralsRobot_availability"></a><h2>AVAILABILITY</h2><p>BounceReferralsRobot is available in Interchange versions:
</p><p>
5.7.0 (git-head)</p></div><div class="refsect1"><a id="BounceReferralsRobot_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_717_12518"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 717</strong></p><div class="figure-contents"><pre class="screen">
['BounceReferralsRobot', 'yesno', 'no'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12519"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="BounceReferralsRobot_authors"></a><h2>AUTHORS</h2><p>Jon Jensen
</p></div><div class="refsect1"><a id="BounceReferralsRobot_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="BounceRobotSessionURL"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>BounceRobotSessionURL — <span class="inlinemediaobject"><img src="./images/new.png" /></span>
remove explicit mv_session_id in RobotUA request if provided
</p></div><div class="refsect1"><a id="BounceRobotSessionURL_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="BounceRobotSessionURL_description"></a><h2>DESCRIPTION</h2><p>When <code class="option">BounceRobotSessionURL</code> is enabled, <a href="glossary.html#GET" class="olink">GET</a> requests from RobotUAs
to URLs with <code class="mv">mv_session_id</code> provided are redirected to the
same URL minus the session_id
</p><p>
This keeps search engines that respect redirects from storing the
session_id-salted URLs in their indexes, and helps them focus on the
real resource with a single URL instead of a multitude of salted
links.
</p></div><div class="refsect1"><a id="BounceRobotSessionURL_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="BounceRobotSessionURL_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_BounceRobotSessionURL_12426"></a><p class="title"><strong>Example: Enabling BounceRobotSessionURL</strong></p><div class="example-contents"><pre class="programlisting">
BounceRobotSessionURL yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="BounceRobotSessionURL_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="BounceRobotSessionURL_availability"></a><h2>AVAILABILITY</h2><p>BounceRobotSessionURL is available in Interchange versions:
</p><p>
5.7.0 (git-head)</p></div><div class="refsect1"><a id="BounceRobotSessionURL_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_718_12427"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 718</strong></p><div class="figure-contents"><pre class="screen">
['BounceRobotSessionURL', 'yesno', 'no'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12428"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="BounceRobotSessionURL_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="BounceRobotSessionURL_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Capability"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Capability — test existence of a capability
</p></div><div class="refsect1"><a id="Capability_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>type</code></em>
<em class="replaceable"><code>type-specific-value</code></em>
... </p></div></div><div class="refsect1"><a id="Capability_description"></a><h2>DESCRIPTION</h2><p>Just like <code class="option">Require</code> or <code class="option">Suggest</code>, this directive checks for
a capability, but unlike the first two it never causes a
warning or other message. This allows a module to be loaded if available
and a program can later check for the capability and dynamically adapt to the
configuration.
</p><p>
"Capabilities" you can check for are:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<code class="literal">globalsub</code> — existence of a <code class="option">GlobalSub</code>
</p></li><li class="listitem"><p>
<code class="literal">sub</code> — existence of a <code class="option">Sub</code>
</p></li><li class="listitem"><p>
<code class="literal">taggroup</code> — existence of a <code class="option">TagGroup</code>
</p></li><li class="listitem"><p>
<code class="literal">usertag</code> — existence of a <code class="option">UserTag</code>
</p></li><li class="listitem"><p>
<code class="literal">module (or perlmodule)</code> — existence of a <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> module
</p></li><li class="listitem"><p>
<code class="literal">include (or perlinclude)</code> — prepend specified path to <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a>'s <code class="varname">@INC</code> include path (makes most sense with <code class="option">Require</code>, not with <code class="option">Suggest</code> or <code class="option">Capability</code> even though it <span class="emphasis"><em>can</em></span> be called that way for equivalent effect)
</p></li><li class="listitem"><p>
<code class="literal">file</code> — existence of a readable file
</p></li><li class="listitem"><p>
<code class="literal">executable</code> — existence of an executable file
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="Capability_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="Capability_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Testing_for_existence_of_all_supported_items_2681"></a><p class="title"><strong>Example: Testing for existence of all supported items</strong></p><div class="example-contents"><pre class="programlisting">
Capability globalsub my_global_sub
Capability sub my_sub
Capability taggroup :group1,:group2 :group3
Capability usertag my_global_usertag
Capability usertag my_catalog_usertag
Capability module Archive::Zip
Capability module Set::Crontab /usr/local/perl/modules/
Capability file /etc/syslog.conf
Capability file relative-dir/file
Capability executable /usr/local/bin/gfont
Capability executable bin/gfont
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Testing_for_existence_of_old_style_Perl_module_2682"></a><p class="title"><strong>Example: Testing for existence of old-style Perl module</strong></p><div class="example-contents"><pre class="programlisting">
Capability module /path/to/module.pl
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Capability_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Capability_availability"></a><h2>AVAILABILITY</h2><p>Capability is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Capability_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_399_12025"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 399</strong></p><div class="figure-contents"><pre class="screen">
['Capability', 'capability', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2579__context_shows_lines_2579_2581__12026"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2579 (context shows lines 2579-2581)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_capability {
return parse_require(@_, 1, 1);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Capability_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Capability_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Suggest" title="Suggest"><span class="citerefentry"><span class="refentrytitle">Suggest</span>(7ic)</span></a>, <a class="link" href="#Require" title="Require"><span class="citerefentry"><span class="refentrytitle">Require</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CartTrigger"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CartTrigger — specify subroutines to invoke when cart contents change
</p></div><div class="refsect1"><a id="CartTrigger_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>subroutine_name</code></em>... </p></div></div><div class="refsect1"><a id="CartTrigger_description"></a><h2>DESCRIPTION</h2><p>The directive specifies names of the <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> subroutines to invoke
when <a href="glossary.html#cart" class="olink">cart</a> contents change. The subroutines can
be defined on both global and catalog level.
</p><p>
The subroutines execute whenever the contents of cart are changed via
the standard means available through <a href="glossary.html#CGI" class="olink">CGI</a> variable space (i.e. when
changes are invoked via the <code class="sgmltag-element">process</code> system <a href="glossary.html#ActionMap" class="olink">ActionMap</a> —
through <code class="mv">mv_order_item</code> and <code class="mv">mv_order_quantity</code> field submissions,
or from a standard Interchange cart page).
</p><p>
The subroutines will be executed per-change, such that any page process
resulting in multiple alterations to the cart will potentially call these
functions multiple times.
</p><p>
The following arguments are passed to all specified subroutines:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
A reference to cart
</p></li><li class="listitem"><p>
A scalar representing the action that fired the trigger; its value will be
one of <code class="literal">add</code>, <code class="literal">update</code> or
<code class="literal">delete</code>
</p></li><li class="listitem"><p>
A hashref pointing to the new row (except for the <code class="literal">delete</code>
action, in which case this will be undefined)
</p></li><li class="listitem"><p>
A hashref representing the old row (except for the <code class="literal">add</code>
action); for the <code class="literal">update</code> action, this will be a
<span class="bold"><strong>copy</strong></span> of the row prior to the change.
The old row will no longer be a member of the cart
</p></li><li class="listitem"><p>
The symbolic name of the cart
</p></li></ul></div><p>
</p><p>
The return value from each subroutine call is pushed onto an array;
when the particular trigger firing is complete (i.e. all subroutines specified
in <code class="option">CartTrigger</code> have been called), the full array of results will be
returned. However, the initial version of this functionality does not use
these return values in any meaningful way.
</p></div><div class="refsect1"><a id="CartTrigger_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CartTrigger_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Quantity_of_subitems_follows_their_master_item_4513"></a><p class="title"><strong>Example: Quantity of subitems follows their master item</strong></p><div class="example-contents"><p>The quantity of sub items are automatically changed to the quantity of
the corresponding master item <span class="bold"><strong>regardless</strong></span>
of the current quantity.</p><pre class="programlisting">
Sub <<EOS
sub cascade_quantities {
my ($cartref, $action, $newref, $oldref, $cartname) = @_;
# act upon the main cart only
return unless $cartname eq 'main';
if ($action eq 'update' && $newref->{mv_si} == 0
&& $newref->{quantity} != $oldref->{quantity}) {
# update quantities of sub items
for my $subref (grep {$_->{mv_mi} eq $newref->{mv_mi}} @$cartref) {
$subref->{quantity} = $newref->{quantity};
}
}
}
EOS
CartTrigger cascade_quantities
CartTriggerQuantity Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CartTrigger_notes"></a><h2>NOTES</h2><p>It must be noted that the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> cart subsystem is based on arrayrefs of hashrefs
(all <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> programming terms) — there is no object encapsulation for
limiting or monitoring program access to the contents of any cart.
Consequently, direct manipulation of the cart from within <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a>
<span class="bold"><strong>will not</strong></span> cause these triggers to fire. The
triggers only fire when the cart contents are modified through the standard
Interchange <a href="glossary.html#CGI" class="olink">CGI</a>-based variable processing. Therefore, it is assumed
(for the moment, at least) that any programmer sufficiently comfortable or
confident to manipulate cart contents directly can also be given the
responsibility of deciding whether or not it is appropriate to invoke cart
triggers along the way.
</p></div><div class="refsect1"><a id="CartTrigger_availability"></a><h2>AVAILABILITY</h2><p>CartTrigger is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CartTrigger_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_712_12495"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 712</strong></p><div class="figure-contents"><pre class="screen">
['CartTrigger', 'routine_array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3777__context_shows_lines_3777_3811__12496"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3777 (context shows lines 3777-3811)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_routine_array {
my($item,$settings) = @_;
return '' unless $settings;
my $c;
if(defined $C) {
$c = $C->{$item};
}
else {
no strict 'refs';
$c = ${"Global::$item"};
}
my @mac;
if($settings =~ /^[-\s\w,]+$/) {
@mac = grep /\S/, split /[\s,]+/, $settings;
}
else {
push @mac, $settings;
}
if(ref($c) eq 'ARRAY') {
push @$c, @mac;
}
elsif($c) {
$c = [$c, @mac];
}
else {
$c = scalar(@mac) > 1 ? [ @mac ] : $mac[0];
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CartTrigger_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CartTrigger_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CartTriggerQuantity" title="CartTriggerQuantity"><span class="citerefentry"><span class="refentrytitle">CartTriggerQuantity</span>(7ic)</span></a>, <a class="link" href="#ItemAction" title="ItemAction"><span class="citerefentry"><span class="refentrytitle">ItemAction</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CartTriggerQuantity"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CartTriggerQuantity — specify whether quantity changes to cart items will cause CartTrigger subroutines to execute
</p></div><div class="refsect1"><a id="CartTriggerQuantity_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="CartTriggerQuantity_description"></a><h2>DESCRIPTION</h2><p>The directive specifies whether quantity changes on existing cart
items will cause specified <code class="option">CartTrigger</code> subroutines to execute.
</p><p>
Note, however, that a quantity change to zero will result in item deletion,
and will consequently cause <code class="option">CartTrigger</code>s to execute regardless
of <code class="option">CartTriggerQuantity</code>'s value.
</p></div><div class="refsect1"><a id="CartTriggerQuantity_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CartTriggerQuantity_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_CartTriggerQuantity_4137"></a><p class="title"><strong>Example: Setting CartTriggerQuantity</strong></p><div class="example-contents"><pre class="programlisting">
CartTriggerQuantity yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CartTriggerQuantity_notes"></a><h2>NOTES</h2><p>It must be noted that the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> cart subsystem is based on arrayrefs of hashrefs
(all <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> programming terms) — there is no object encapsulation for
limiting or monitoring program access to the contents of any cart.
Consequently, direct manipulation of the cart from within <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a>
<span class="bold"><strong>will not</strong></span> cause these triggers to fire. The
triggers only fire when the cart contents are modified through the standard
Interchange <a href="glossary.html#CGI" class="olink">CGI</a>-based variable processing. Therefore, it is assumed
(for the moment, at least) that any programmer sufficiently comfortable or
confident to manipulate cart contents directly can also be given the
responsibility of deciding whether or not it is appropriate to invoke cart
triggers along the way.
</p></div><div class="refsect1"><a id="CartTriggerQuantity_availability"></a><h2>AVAILABILITY</h2><p>CartTriggerQuantity is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CartTriggerQuantity_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_713_12403"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 713</strong></p><div class="figure-contents"><pre class="screen">
['CartTriggerQuantity', 'yesno', 'no'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12404"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CartTriggerQuantity_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CartTriggerQuantity_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CartTrigger" title="CartTrigger"><span class="citerefentry"><span class="refentrytitle">CartTrigger</span>(7ic)</span></a>, <a class="link" href="#ItemAction" title="ItemAction"><span class="citerefentry"><span class="refentrytitle">ItemAction</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Catalog"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Catalog — register catalog with the Interchange server
</p></div><div class="refsect1"><a id="Catalog_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>name</code></em> <em class="replaceable"><code>catalog_directory</code></em> <em class="replaceable"><code>link_program_path</code></em>... </p></div></div><div class="refsect1"><a id="Catalog_description"></a><h2>DESCRIPTION</h2><p>The directive registers a <a href="glossary.html#catalog" class="olink">catalog</a> that will run on the corresponding <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>
installation.
</p><p>
The directive expects three or more arguments.
</p><p>
First expected is the name of the <a href="glossary.html#catalog" class="olink">catalog</a>. It will be referred to by the specified
name in error, warning, and informational messages. It must contain only
alphanumeric characters, hyphens, and underscores. It is highly recommended that
it is also all lowercase.
</p><p>
Second argument specifies the filesystem base directory of the catalog.
If the directory does not exist, the required <code class="filename">catalog.cfg</code> is not there, or <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>
detects any other problem, catalog configuration will be skipped and the
<a href="glossary.html#catalog" class="olink">catalog</a>
won't be activated.
</p><p>
Third argument is the so called <code class="literal">SCRIPT_NAME</code> of the
<a href="glossary.html#link-program" class="olink">link program</a>. It is a webserver path by which the catalog can be
accessed. It can be followed by different
<span class="bold"><strong>aliases</strong></span>, all allowing access to
the same <a href="glossary.html#catalog" class="olink">catalog</a>. For example, this is useful when calling an SSL
server or a
members-only alias that requires a Basic HTTP authorization using the
username/password pair. All subsequently generated links would be called using
the aliased URL.
</p><p>
The script name must be unique among CGI program paths that run on the
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server, unless the <code class="option">FullUrl</code> directive is specified. In this case,
hostnames can be added to differentiate otherwise same paths; as usual, see
<a class="xref" href="#Catalog_examples" title="EXAMPLES">the section called “EXAMPLES”</a> for clarification.
</p><p>
It is also possible to define catalog-specific <a href="glossary.html#configuration" class="olink">configuration</a> directives
from the global <code class="filename">interchange.cfg</code> file. Again, see <a class="xref" href="#Catalog_examples" title="EXAMPLES">the section called “EXAMPLES”</a>.
</p></div><div class="refsect1"><a id="Catalog_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="Catalog_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Registering_a_catalog_3080"></a><p class="title"><strong>Example: Registering a catalog</strong></p><div class="example-contents"><pre class="programlisting">
Catalog simple /home/catalogs/simple /cgi-bin/ic/simple
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Using_FullUrl_to_differentiate_same_named_catalogs_on_different_hosts_3081"></a><p class="title"><strong>Example: Using FullUrl to differentiate same-named catalogs on different hosts</strong></p><div class="example-contents"><pre class="programlisting">
FullUrl yes
Catalog simple1 /home/catalogs/simple1 www.company1.com/cgi-bin/ic/simple
Catalog simple2 /home/catalogs/simple2 www.company2.com/cgi-bin/ic/simple
</pre><p>
Make sure to read the <code class="option">FullUrl</code> directive reference page before just
including it in your <a href="glossary.html#configuration" class="olink">configuration</a>.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Elaborate_Catalog_directive_definition_3082"></a><p class="title"><strong>Example: Elaborate Catalog directive definition</strong></p><div class="example-contents"><p>Given the nature of the <code class="option">Catalog</code> directive, a catalog can be registered somewhat
verbosely with:</p><pre class="programlisting">
Catalog simple directory /home/catalogs/simple
Catalog simple script /cgi-bin/ic/simple
Catalog simple alias /simple
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Defining_catalog_specific_directives_in_the_global_config_file_3083"></a><p class="title"><strong>Example: Defining catalog-specific directives in the global config file</strong></p><div class="example-contents"><p>Re-using the elaborate example from just above, it is also possible to define
catalog-specific directives in the global <code class="filename">interchange.cfg</code> file.
This is most useful to do with the <code class="option">ErrorFile</code> and <code class="option">DisplayErrors</code>
directives:</p><pre class="programlisting">
Catalog simple directive ErrorFile /var/log/interchange/simple-error.log
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Catalog_notes"></a><h2>NOTES</h2><p><code class="option">Catalog</code> is one of the basic Interchange <a href="glossary.html#configuration" class="olink">configuration</a> directives.
</p><p>
<span class="command"><strong>makecat</strong></span>, the <a href="glossary.html#catalog" class="olink">catalog</a> creation helper script,
automatically inserts
the <code class="option">Catalog</code> line in the <code class="filename">interchange.cfg</code> file as part of the standard procedure.
</p><p>
If the <code class="filename">catalog.cfg</code> file, expected in the catalog base directory, is not found, or is
unreadable by the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server, somewhat misguiding error message will be reported.
Instead of the appropriate permissions-problem message, the mandatory
<code class="option">VendURL</code> directive will be reported as undefined.
</p></div><div class="refsect1"><a id="Catalog_availability"></a><h2>AVAILABILITY</h2><p>Catalog is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Catalog_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_512_12129"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 512</strong></p><div class="figure-contents"><pre class="screen">
['Catalog', 'catalog', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4120__context_shows_lines_4120_4221__12130"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4120 (context shows lines 4120-4221)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_catalog {
my ($var, $setting) = @_;
my $num = ! defined $Global::Catalog ? 0 : $Global::Catalog;
return $num unless (defined $setting && $setting);
my($name,$base,$dir,$script, @rest);
($name,@rest) = Text::ParseWords::shellwords($setting);
my %remap = qw/
base base
alias alias
aliases alias
directory dir
dir dir
script script
directive directive
fullurl full_url
full full_url
/;
my ($cat, $key, $value);
if ($Global::Catalog{$name}) {
# already defined
$cat = $Global::Catalog{$name};
$key = shift @rest;
$value = shift @rest;
}
elsif(
$var =~ /subcatalog/i and
@rest > 2
and file_name_is_absolute($rest[1])
)
{
$cat = {
name => $name,
base => $rest[0],
dir => $rest[1],
script => $rest[2],
};
splice(@rest, 0, 3);
$cat->{alias} = [ @rest ]
if @rest;
}
elsif( file_name_is_absolute($rest[0]) ) {
$cat = {
name => $name,
dir => $rest[0],
script => $rest[1],
};
splice(@rest, 0, 2);
$cat->{alias} = [ @rest ]
if @rest;
}
else {
$key = shift @rest;
$value = shift @rest;
$cat = { name => $name };
}
$key = $remap{$key} if $key && defined $remap{$key};
if(! $key) {
# Nada
}
elsif($key eq 'alias' or $key eq 'server') {
$cat->{$key} = [] if ! $cat->{$key};
push @{$cat->{$key}}, $value;
push @{$cat->{$key}}, @rest if @rest;
}
elsif($key eq 'global') {
$cat->{$key} = $Global::AllowGlobal->{$name} = is_yes($value);
}
elsif($key eq 'directive') {
no strict 'refs';
my $p = $value;
my $v = join " ", @rest;
$cat->{$key} = {} if ! $cat->{$key};
my $ref = set_directive($p, $v, 1);
if(ref $ref->[1] =~ /HASH/) {
if(! $cat->{$key}{$ref->[0]} ) {
$cat->{$key}{$ref->[0]} = { %{"Global::$ref->[0]"} };
}
for (keys %{$ref->[1]}) {
$cat->{$key}{$ref->[0]}{$_} = $ref->[1]->{$_};
}
}
else {
$cat->{$key}{$ref->[0]} = $ref->[1];
}
}
else {
$cat->{$key} = $value;
}
#::logDebug ("parsing catalog $name = " . uneval_it($cat));
$Global::Catalog{$name} = $cat;
# Define the main script name and array of aliases
return ++$num;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Catalog_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Catalog_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#FullUrl" title="FullUrl"><span class="citerefentry"><span class="refentrytitle">FullUrl</span>(7ic)</span></a>, <a class="link" href="#ConfigDatabase" title="ConfigDatabase"><span class="citerefentry"><span class="refentrytitle">ConfigDatabase</span>(7ic)</span></a>, <a class="link" href="#SubCatalog" title="SubCatalog"><span class="citerefentry"><span class="refentrytitle">SubCatalog</span>(7ic)</span></a>, <a class="link" href="#MailOrderTo" title="MailOrderTo"><span class="citerefentry"><span class="refentrytitle">MailOrderTo</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CatalogUser"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CatalogUser — specify catalog-specific usernames to use when accessing files with absolute pathnames
</p></div><div class="refsect1"><a id="CatalogUser_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>catalog_name username</code></em> </p></div></div><div class="refsect1"><a id="CatalogUser_description"></a><h2>DESCRIPTION</h2><p>The directive specifies catalogs and the corresponding usernames
which will be used in accessing files with absolute pathnames.
Actually, the file access itself is still performed under the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>
server username, but the <code class="option">CatalogUser</code> values are used for
a "would-be" kind of check.
</p><p>
This directive is only honored when <code class="option">NoAbsolute</code> is enabled.
Then, the situation is as follows:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> allows the file to be read or written if the absolute pathname
points somewhere in the catalog directory (<a href="glossary.html#CATROOT" class="olink">CATROOT</a>) or
<code class="option">TemplateDir</code>.
</p></li><li class="listitem"><p>
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> allows the file to be read if the appropriate catalog's
<code class="option">CatalogUser</code> is file owner, or belongs to a user group that
can read the file. (The same analogy is used for write access).
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="CatalogUser_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="CatalogUser_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_CatalogUser_2698"></a><p class="title"><strong>Example: Defining CatalogUser</strong></p><div class="example-contents"><pre class="programlisting">
CatalogUser foundation joe
CatalogUser reports jane
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CatalogUser_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="CatalogUser_availability"></a><h2>AVAILABILITY</h2><p>CatalogUser is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CatalogUser_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_392_12031"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 392</strong></p><div class="figure-contents"><pre class="screen">
['CatalogUser', 'hash', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12032"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CatalogUser_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CatalogUser_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CategoryField"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CategoryField — specify name of the "category" field in the Interchange database
</p></div><div class="refsect1"><a id="CategoryField_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>field_name</code></em> </p></div></div><div class="refsect1"><a id="CategoryField_description"></a><h2>DESCRIPTION</h2><p>By default, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> expects item category to be in the
<span class="database">category</span> field in the database,
if a system of categories is used.
This directive allows modification of the default name.
</p></div><div class="refsect1"><a id="CategoryField_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CategoryField_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Redefining_CategoryField_4461"></a><p class="title"><strong>Example: Redefining CategoryField</strong></p><div class="example-contents"><pre class="programlisting">
CategoryField type
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CategoryField_notes"></a><h2>NOTES</h2><p>The field can also be set according to a <code class="option">Locale</code>.
</p></div><div class="refsect1"><a id="CategoryField_availability"></a><h2>AVAILABILITY</h2><p>CategoryField is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CategoryField_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_696_12484"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 696</strong></p><div class="figure-contents"><pre class="screen">
['CategoryField', undef, 'category'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CategoryField_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CategoryField_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CheckHTML"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CheckHTML — check the generated HTML code with an external program
</p></div><div class="refsect1"><a id="CheckHTML_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>program_name_and_arguments</code></em> </p></div></div><div class="refsect1"><a id="CheckHTML_description"></a><h2>DESCRIPTION</h2><p>Defines the name of an external program which will be invoked
to check the generated page <a href="glossary.html#HTML" class="olink">HTML</a> code for correctness
(<span class="command"><strong>/usr/bin/weblint</strong></span>, for example).
</p><p>
Note that you need to put <code class="code">[flag checkhtml]</code> on your page,
(or wrap only a block of HTML code to check in
<code class="code">[tag flag checkhtml]...[/tag]</code>)
to trigger the actual invocation of the specified external command.
</p><p>
The output of the HTML checker program will be included in the
output page, so you might want to wrap it in HTML comments
(<!-- ... -->). Then you can check it out by viewing the HTML
page source in your browser.
</p><p>
If you want a quick way to enable or disable this feature, without
modifying each HTML page individually, put <code class="code">__CHECK_HTML__</code>
on every page (or ideally, in a template). Then, to enable the
checker, define <code class="code">Variable CHECK_HTML [flag checkhtml]</code> in
<code class="filename">interchange.cfg</code>. To disable it, leave the variable value empty.
</p></div><div class="refsect1"><a id="CheckHTML_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="CheckHTML_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_CheckHTML_2950"></a><p class="title"><strong>Example: Enabling CheckHTML</strong></p><div class="example-contents"><pre class="programlisting">
CheckHTML /usr/local/bin/weblint --structure --fluff -
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CheckHTML_notes"></a><h2>NOTES</h2><p>Leaving this directive enabled on a production server usually leads to
unnecessary performance degradation. The additional process spawn
(and the time it takes to complete) every time a page is visited is
costly.
</p><p>
<span class="bold"><strong>
Additionally, this directive currently appears to be broken
(it simply never gets called).
</strong></span>
</p></div><div class="refsect1"><a id="CheckHTML_availability"></a><h2>AVAILABILITY</h2><p>CheckHTML is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CheckHTML_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_508_12097"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 508</strong></p><div class="figure-contents"><pre class="screen">
['CheckHTML', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CheckHTML_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CheckHTML_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ChildLife"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ChildLife — define maximum child process lifetime
</p></div><div class="refsect1"><a id="ChildLife_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>interval</code></em> </p></div></div><div class="refsect1"><a id="ChildLife_description"></a><h2>DESCRIPTION</h2><p><a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> page servers are, by default, periodically restarted to make sure
there are no problems arising from long-running processes
(such as memory leaks).
</p><p>
In general, restarting is handled by the
<code class="option">MaxRequestsPerChild</code> configuration directive.
</p><p>
However, when <code class="option">PreFork</code> <a href="glossary.html#ic-run-mode" class="olink">ic run mode</a> is used, some page servers
never win the page server "selection battle"; they never get to serve a page
request and consequently they are never restarted by <code class="option">MaxRequestsPerChild</code>.
This is why the <code class="option">ChildLife</code> directive restarts
a page server on an unconditional, periodic basis to make sure all servers
are re-started from time to time.
</p><p>
If <code class="option">ChildLife</code> is not set, the "starved" page servers will act just
like they did before; get stuck in an internal loop forever until
<span class="command"><strong>kill -9</strong></span> on the process happens.
</p><p>
This should clear up the problem where people see with a growing number of
servers over time.
</p></div><div class="refsect1"><a id="ChildLife_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="ChildLife_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ChildLife_3237"></a><p class="title"><strong>Example: Setting ChildLife</strong></p><div class="example-contents"><pre class="programlisting">
ChildLife 30 minutes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ChildLife_notes"></a><h2>NOTES</h2><p>The directive should only be used when <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> is in <code class="literal">PreFork</code>
<a href="glossary.html#ic-run-mode" class="olink">ic run mode</a>.
</p><p>
The directive value can be any Interchange <a href="glossary.html#interval" class="olink">interval</a>.
</p></div><div class="refsect1"><a id="ChildLife_availability"></a><h2>AVAILABILITY</h2><p>ChildLife is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ChildLife_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_449_12172"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 449</strong></p><div class="figure-contents"><pre class="screen">
['ChildLife', 'time', 0],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4088__context_shows_lines_4088_4100__12173"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4088 (context shows lines 4088-4100)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_time {
my($var, $value) = @_;
my($n);
return $value unless $value;
# $C->{Source}->{$var} = [$value];
$n = time_to_seconds($value);
config_error("Bad time format ('$value') in the $var directive\n")
unless defined $n;
$n;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ChildLife_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="ChildLife_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#MaxRequestsPerChild" title="MaxRequestsPerChild"><span class="citerefentry"><span class="refentrytitle">MaxRequestsPerChild</span>(7ic)</span></a>, <a class="link" href="#PIDcheck" title="PIDcheck"><span class="citerefentry"><span class="refentrytitle">PIDcheck</span>(7ic)</span></a>, <a class="link" href="#PIDfile" title="PIDfile"><span class="citerefentry"><span class="refentrytitle">PIDfile</span>(7ic)</span></a>, <a class="link" href="#MaxServers" title="MaxServers"><span class="citerefentry"><span class="refentrytitle">MaxServers</span>(7ic)</span></a>, <a class="link" href="#PreFork" title="PreFork"><span class="citerefentry"><span class="refentrytitle">PreFork</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CodeDef"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CodeDef — generic subroutine mapper
</p></div><div class="refsect1"><a id="CodeDef_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="CodeDef_description"></a><h2>DESCRIPTION</h2><p>A generic <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> subroutine mapper which allows mapping of subroutines to
<a href="glossary.html#ActionMap" class="olink">ActionMap</a>s,
CoreTags, <code class="option">UserTag</code>s,
<a href="glossary.html#filter" class="olink">filter</a>s,
<a href="glossary.html#form-action" class="olink">form action</a>s,
<code class="option">GlobalSub</code>s,
ItemActions,
SearchOps,
LocaleChanges,
OrderChecks,
and Widgets.
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
SearchOp definition needs to be a function that creates and returns a
search function. The search function will receive the data to match
and should return <code class="literal">1</code> if the value matches.
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="CodeDef_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="CodeDef_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_a_custom_SearchOp_2498"></a><p class="title"><strong>Example: Defining a custom SearchOp</strong></p><div class="example-contents"><p>Here's an exemplary "<code class="literal">find_hammer</code>" SearchOp that
should be placed in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
CodeDef find_hammer SearchOp find_hammer
CodeDef find_hammer Routine <<EOR
sub {
# Called with:
# $self - search object
# $i - index into coordinated search array
# $string - data to match
# $opname - name of the specified mv_column_op
my($self, $i, $string, $opname);
#::logDebug("Calling fake SearchOp");
return sub {
#::logDebug("testing with fake SearchOp");
my $string = shift;
$string =~ /hammer/i;
};
}
EOR
</pre><p>
The above simple function does not honor <code class="mv">mv_negate</code> or other
variables. See <code class="function">Vend::Search::create_text_query</code>
for an example of how to create a proper search routine and honor
various associated search parameters.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Widgets_with_multiple_selections_2499"></a><p class="title"><strong>Example: Widgets with multiple selections</strong></p><div class="example-contents"><p>CodeDef checkbox Multiple 1
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="CodeDef_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="CodeDef_availability"></a><h2>AVAILABILITY</h2><p>CodeDef is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CodeDef_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_500_11974"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 500</strong></p><div class="figure-contents"><pre class="screen">
['CodeDef', 'mapped_code', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_660_11975"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 660</strong></p><div class="figure-contents"><pre class="screen">
['CodeDef', 'mapped_code', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5037__context_shows_lines_5037_5098__11976"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5037 (context shows lines 5037-5098)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_mapped_code {
my ($var, $value) = @_;
return {} if ! $value;
## Can't give CodeDef a default or this will be premature
get_system_code() unless defined $SystemCodeDone;
my($tag,$p,$val) = split /\s+/, $value, 3;
# Canonicalize
$p = $tagCanon{lc $p} || ''
or ::logDebug("bizarre mapped code line '$value'");
$tag =~ tr/-/_/;
$tag =~ s/\W//g
and config_warn("Bad characters removed from '%s'.", $tag);
my $repos = $C ? ($C->{CodeDef} ||= {}) : ($Global::CodeDef ||= {});
if ($tagSkip{$p}) {
return $repos;
}
my $dest = $valid_dest{lc $p} || $current_dest{$tag} || $CodeDest;
if(! $dest) {
config_warn("no destination for %s %s, skipping.", $var, $tag);
return $repos;
}
$current_dest{$tag} = $dest;
$repos->{$dest} ||= {};
my $c = $repos->{$dest};
if($Compiled{$p}) {
$c->{$Compiled{$p}} ||= {};
parse_action($var, "$tag $val", $c->{$Compiled{$p}} ||= {});
}
elsif(defined $tagAry{$p}) {
my(@v) = Text::ParseWords::shellwords($val);
$c->{$p}{$tag} = [] unless defined $c->{$p}{$tag};
push @{$c->{$p}{$tag}}, @v;
}
elsif(defined $tagHash{$p}) {
my(%v) = Text::ParseWords::shellwords($val);
$c->{$p}{$tag} = {} unless defined $c->{$p}{$tag};
for (keys %v) {
$c->{$p}{$tag}{$_} = $v{$_};
}
}
elsif(defined $tagBool{$p}) {
$c->{$p}{$tag} = 1
unless defined $val and $val =~ /^[0nf]/i;
}
else {
config_warn("%s %s scalar parameter %s redefined.", $var, $tag, $p)
if defined $c->{$p}{$tag};
$c->{$p}{$tag} = $val;
}
return $repos;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CodeDef_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CodeDef_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Filter" title="Filter"><span class="citerefentry"><span class="refentrytitle">Filter</span>(7ic)</span></a>, <a class="link" href="#FormAction" title="FormAction"><span class="citerefentry"><span class="refentrytitle">FormAction</span>(7ic)</span></a>, <a class="link" href="#ActionMap" title="ActionMap"><span class="citerefentry"><span class="refentrytitle">ActionMap</span>(7ic)</span></a>, <a class="link" href="#UserTag" title="UserTag"><span class="citerefentry"><span class="refentrytitle">UserTag</span>(7ic)</span></a>, <a class="link" href="#ItemAction" title="ItemAction"><span class="citerefentry"><span class="refentrytitle">ItemAction</span>(7ic)</span></a>, <a class="link" href="#GlobalSub" title="GlobalSub"><span class="citerefentry"><span class="refentrytitle">GlobalSub</span>(7ic)</span></a>, <a class="link" href="#Sub" title="Sub"><span class="citerefentry"><span class="refentrytitle">Sub</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CodeRepository"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CodeRepository — specify directory containing code that can be included in the running installation when needed
</p></div><div class="refsect1"><a id="CodeRepository_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory_name</code></em> </p></div></div><div class="refsect1"><a id="CodeRepository_description"></a><h2>DESCRIPTION</h2><p>There is a huge base of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> code (collection of <code class="option">UserTag</code>s and
<code class="option">CodeDef</code>s) included in the default installation.
Much of it is not needed for the usual installations,
causing a larger process memory profile than necessary.
</p><p>
Furthermore, it is hard to manually determine what subset of code is required,
especially when an <a href="glossary.html#ITL" class="olink">ITL</a> tag calls
<code class="code">$Tag-><em class="replaceable"><code>TAGNAME</code></em>()</code>
which calls some filter which calls some sort of an action —
you get the idea.
</p><p>
<code class="option">CodeRepository</code> allows building catalogs with a more optimal
set of code than just "everything".
</p><p>
<code class="option">CodeRepository</code> depends on a related directive, <code class="option">AccumulateCode</code>.
If <code class="option">AccumulateCode</code> is disabled, operation is traditional and everything
gets loaded at <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> startup time. (There have
been some code initialization changes and routine calling changes,
but the data structures are identical and no difference in operation
should be seen).
</p><p>
It's when you remove the
<code class="filename"><a href="glossary.html#ICROOT" class="olink">ICROOT</a>/code/</code> directory and
enable <code class="option">AccumulateCode</code> that things get interesting.
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> starts looking into <code class="option">CodeRepository</code> for pieces it finds
missing (<a href="glossary.html#ITL" class="olink">ITL</a> tags, <a href="glossary.html#ActionMap" class="olink">ActionMap</a>s, <a href="glossary.html#filter" class="olink">filter</a>s, widgets, etc.)
and compiles these as needed, in runtime!
The code is sent to the master process for compilation and
incorporation, so that on the next page access (or in the worst case,
after <code class="option">HouseKeeping</code> seconds), <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> will find the code already compiled
and ready to go.
</p><p>
Fetched code blocks are copied to
<code class="filename"><code class="varname">$Global::TagDir</code>/Accumulated/</code>.
When you restart <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> the next time, these code blocks will be found,
read normally and need not be recompiled and loaded on the fly again.
</p><p>
Over time, as you access pages and routines, a full set of tags
will be developed and you can then disable <code class="option">AccumulateCode</code>.
(In fact, <code class="option">AccumulateCode</code> is recommended only for development and should
really be turned off in production systems).
</p></div><div class="refsect1"><a id="CodeRepository_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="CodeRepository_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_up_CodeRepository_3123"></a><p class="title"><strong>Example: Setting up CodeRepository</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
AccumulateCode Yes
CodeRepository /usr/interchange/code.pool/
</pre><p>
To prepare the <code class="filename">code.pool/</code>
directory, you can do something like this:</p><pre class="programlisting">
$ mkdir /usr/interchange/code.pool/
$ mv /usr/interchange/code/* /usr/interchange/code.pool/
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CodeRepository_notes"></a><h2>NOTES</h2><p>There can be failures due to calling <code class="code">$Tag-><em class="replaceable"><code>TAGNAME</code></em>()</code> from within
embedded
<a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> for the first time, particularly when it uses a "MapRoutine" or
calls another <code class="code">$Tag-><em class="replaceable"><code>TAGNAME</code></em>()</code> within. This is due to
<code class="classname">Safe</code>, and there is probably
not much to be done about it. The good news is that the error should
go away after <code class="option">HouseKeeping</code> seconds, when the tag gets compiled by the
master.
<code class="sgmltag-element">area</code>, <code class="sgmltag-element">tmp</code>, <code class="sgmltag-element">tmpn</code>, and <code class="sgmltag-element">image</code> are examples of tags known
to fail in this manner.
Tags that are frequently called
in this fashion should probably be manually placed in directory
<code class="filename">code/Vital/</code> and not
be accumulated "by chance".
Anyway, this temporary failure could be avoided by listing <a href="glossary.html#catalog" class="olink">catalog</a> in the
<code class="option">AllowGlobal</code> directive, and it
might also be possible to make a directive that allows <code class="option">AllowGlobal</code> for
a catalog automatically, when in <code class="option">AccumulateCode</code> mode.
(If you don't want to trade immediate code loading for the lack of
<code class="option">AllowGlobal</code> protection, then just set <code class="option">HouseKeeping</code> to
something like <code class="literal">20 seconds</code> — and
only do it on your development system!)
</p><p>
One convenient side-effect is that you can easily load new code (such as new
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> tags) "on the fly" by simply adding files to the <code class="option">CodeRepository</code>
directory. This alleviates the need for <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server restart.
It might also be possible to dynamically <span class="bold"><strong>remove and
load</strong></span> code from the server in this manner, but this has yet
to be looked at.
</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="./images/warning.png" /></td><th align="left">Warning</th></tr><tr><td align="left" valign="top"><p>
Nice features are often dangerous! Don't run this in
production — you have been warned!
</p><p>
"OrderCheck" <code class="option">CodeDef</code> is not yet implemented, and a full audit has
not been done on all compiled code directives.
</p><p>
Not fully tested in <code class="option">PreFork</code> mode, and really not intended for
that mode.
</p><p>
Defining multiple tags or code blocks (<code class="option">UserTag</code>s or <code class="option">CodeDef</code>s)
within a single file may result in an unpredictable behavior.
</p><p>
This feature only applies to global code — catalog-based code
is not affected and behaves as usual.
</p></td></tr></table></div><p>
</p></div><div class="refsect1"><a id="CodeRepository_availability"></a><h2>AVAILABILITY</h2><p>CodeRepository is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CodeRepository_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_428_12140"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 428</strong></p><div class="figure-contents"><pre class="screen">
['CodeRepository', 'root_dir', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3898__context_shows_lines_3898_3905__12141"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3898 (context shows lines 3898-3905)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir {
my($var, $value) = @_;
return '' unless $value;
$value = "$Global::VendRoot/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CodeRepository_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="CodeRepository_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AccumulateCode" title="AccumulateCode"><span class="citerefentry"><span class="refentrytitle">AccumulateCode</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CommonAdjust"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CommonAdjust — define default settings for a flexible, chained item pricing scheme
</p></div><div class="refsect1"><a id="CommonAdjust_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <code class="literal"><em class="replaceable"><code>CommonAdjust_string</code></em></code> </p></div></div><div class="refsect1"><a id="CommonAdjust_description"></a><h2>DESCRIPTION</h2><p><code class="option">CommonAdjust</code> is used to define the default settings for a flexible,
chained item pricing scheme.
</p><p>
The whole pricing idea and the explanation of <span class="emphasis"><em>CommonAdjust string</em></span>s can be found under the
<a href="glossary.html#price" class="olink">price</a> glossary entry. Make sure you read it, or you'll have only
a limited success with <a class="xref" href="#CommonAdjust_examples" title="EXAMPLES">the section called “EXAMPLES”</a>.
</p></div><div class="refsect1"><a id="CommonAdjust_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CommonAdjust_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_The_pricing_database_3940"></a><p class="title"><strong>Example: The pricing database</strong></p><div class="example-contents"><p>Most of the practical setups will use a separate (<span class="emphasis"><em>outboard</em></span>)
database to define pricing-related options. This <span class="emphasis"><em>could</em></span>
be all done in the <span class="database">products</span> database as well, but let's
stick to a visually cleaner implementation. (<span class="bold"><strong>This
database is used by other examples above!)</strong></span>
</p><p>
An example <span class="database">pricing</span> database looks like this:</p><pre class="programlisting">
code common q1 q5 q10 XL S red
99-102 10 9 8 1 -0.50 0.75
00-343 2
red 0.75
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Adjusting_item_price_based_on_size_3942"></a><p class="title"><strong>Example: Adjusting item price based on size</strong></p><div class="example-contents"><p>Let's say we had a product, a t-shirt for example, and we wanted to define
a pricing adjustment based on product's <code class="literal">size</code> attribute. The
<span class="database">price</span> field in the
<span class="database">products</span> database should have the following value
to achieve the effect:</p><pre class="programlisting">
10.00, ==size:pricing
</pre><p>
You see, the base price of <code class="literal">10.00</code> will be adjusted
according to the <code class="literal">size</code> attribute. If we had a t-shirt
with <a href="glossary.html#SKU" class="olink">SKU</a> <code class="literal">99-102</code> and size <code class="literal">XL</code>,
then an amount of <code class="literal">1.00</code> would be added and form a total
price of <code class="literal">11.00</code> (according to the
<span class="database">pricing</span> table above). The same product in size
<code class="literal">S</code> (small) would have a "bonus" of <code class="literal">-0.50</code>
and result in <code class="literal">9.50</code> total. For any other size, the base
price would stay <span class="emphasis"><em>as-is</em></span> because no matching column
would be found in <span class="database">pricing</span>.
</p><p>
If we entered the above price specified in the
<span class="database">price</span> field for item
<code class="literal">00-343</code>, then an adjustment of <code class="literal">+2</code> would
be made only for size variant <code class="literal">XL</code>.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Adjusting_item_price_based_on_size_and_color_3943"></a><p class="title"><strong>Example: Adjusting item price based on size and color</strong></p><div class="example-contents"><p>Let's say we had a t-shirt from previous example, and we wanted to define
a pricing adjustment based on color attribute (in addition to size which we
already implemented). The
<span class="database">price</span> field in the
<span class="database">products</span> database should have the following value
to achieve the effect:</p><pre class="programlisting">
10.00, ==size:pricing, ==color:pricing
</pre><p>
You see, the base price of <code class="literal">10.00</code> will be adjusted
according to both <code class="literal">size</code> and <code class="literal">color</code>
attributes. For item SKU <code class="literal">99-102</code>, additional
<code class="literal">0.75</code> would be added for a specific <code class="literal">red</code>
color (according to the <span class="database">pricing</span> table above).
</p></div></div><br class="example-break" /><div class="example"><a id="example_Adjusting_item_attributes_based_on_a_common_column_3944"></a><p class="title"><strong>Example: Adjusting item attributes based on a common column</strong></p><div class="example-contents"><p>Let's say we had a bunch of t-shirt products and the <code class="literal">red</code>
color always added an additional <code class="literal">0.75</code> to the corresponding
base price.
</p><p>
What we know by now is that to achieve that effect, we could create a column
named <code class="literal">red</code> in the <span class="database">pricing</span> database.
In the same database, we would then add an entry for all t-shirt items
and put a value of <code class="literal">0.75</code> in the
<span class="database">red</span> field. This approach, however,
is error-prone and of linear complexity — more t-shirt models you have,
more work is needed to catalog them properly.
</p><p>
The solution to this problem is elegant. Instead of defining the
<span class="database">red</span> column, define one column of a
common name (<code class="literal">common</code> itself is one good name for that
column), and add <code class="literal">red</code> as an entry in the database.
Refer to the first example in which we show a sample
<span class="database">pricing</span> database and where we did that (in the last row).
You can then instruct <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to search for a row in the table with item color
as key. Here's how to modify the previous example:</p><pre class="programlisting">
10.00, ==size:pricing, ==color:pricing:common
</pre><p>
What's more, if you ever wanted to define an adjustment for another color,
the only thing you'd have to do would be to add one entry in the
<span class="database">pricing</span> database:</p><pre class="programlisting">
blue 0.50
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Adjusting_item_price_based_on_quantity_3945"></a><p class="title"><strong>Example: Adjusting item price based on quantity</strong></p><div class="example-contents"><p>The <a href="glossary.html#price" class="olink">price</a> glossary entry explained the format of <span class="emphasis"><em>CommonAdjust string</em></span>s.
To enable quantity based pricing, we need to name the columns that
will participate in the process (remember, numerical portions of the
column names denote minimal quantity levels). Just in case, we can also
specify a default price which will be applied
<span class="bold"><strong>only if</strong></span> the lookup in the
<span class="database">pricing</span> database returns blank or zero value.
In this example,
after the base price gets determined based on quantity, the size and
color attributes will proceed with further price adjustment as usual:
</p><p>
</p><pre class="programlisting">
pricing:q1,q5,q10:, ;10.00, ==size:pricing, ==color:pricing:common
</pre><p>
In the above example, the product (a t-shirt in our example) with SKU
<code class="literal">99-102</code> would have a base price of
<code class="literal">8.00</code> each, if ordered in quantity of 10 or more
(again, according to the <span class="database">pricing</span> table from the
beginning of <a class="xref" href="#CommonAdjust_examples" title="EXAMPLES">the section called “EXAMPLES”</a>).
</p></div></div><br class="example-break" /><div class="example"><a id="example_Terminating_the_price_adjustment_chain_3946"></a><p class="title"><strong>Example: Terminating the price adjustment chain</strong></p><div class="example-contents"><p>Let's say we defined a fallback price (the same way as in the example above),
and wanted to terminate the pricing chain (skip any further adjustments
— size- and color-based adjustment in our case) if the fallback price
was applied. The code needed looks <span class="emphasis"><em>almost</em></span> the same
as above, except that the colon (<code class="literal">,</code>) does
<span class="bold"><strong>not</strong></span> follow the fallback price:
</p><p>
</p><pre class="programlisting">
pricing:q1,q5,q10:, ;10.00 ==size:pricing, ==color:pricing:common
</pre><p>
In the above example, the product (a t-shirt in our example) with SKU
<code class="literal">99-102</code> would have a base price of
<code class="literal">8.00</code> each, if ordered in quantity of 10 or more
(again, according to the <span class="database">pricing</span> table from the
beginning of <a class="xref" href="#CommonAdjust_examples" title="EXAMPLES">the section called “EXAMPLES”</a>).
</p></div></div><br class="example-break" /><div class="example"><a id="example_Using_the__mix_and_match__feature_3947"></a><p class="title"><strong>Example: Using the "mix-and-match" feature</strong></p><div class="example-contents"><p>As mentioned in the <a href="glossary.html#price" class="olink">price</a> glossary entry, you can have quantities
of different items (but which belong to the same product group) added
together to determine the appropriate price class. With a
<span class="database">pricing</span> table of:</p><pre class="programlisting">
sku price_group q5 q10 q25
os28004 group_a 10 9 8
os28008 group_a 20 18 17
</pre><p>
and a <code class="option">CommonAdjust</code> setting of:</p><pre class="programlisting">
pricing:price_group,q5,q10,q25
</pre><p>
the price for six items os28004 would be <code class="literal">9.00</code> each, and
the price for three items os28008 would be <code class="literal">18.00</code> each.
(No, this is not a mistake in the text, take another look at the description).
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="CommonAdjust_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="CommonAdjust_availability"></a><h2>AVAILABILITY</h2><p>CommonAdjust is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CommonAdjust_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_640_12360"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 640</strong></p><div class="figure-contents"><pre class="screen">
['CommonAdjust', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CommonAdjust_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CommonAdjust_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#UseModifier" title="UseModifier"><span class="citerefentry"><span class="refentrytitle">UseModifier</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ConfDir"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ConfDir — specify catalog "config" directory
</p></div><div class="refsect1"><a id="ConfDir_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory_name</code></em> </p></div></div><div class="refsect1"><a id="ConfDir_description"></a><h2>DESCRIPTION</h2><p>Specify catalog "config" directory. By default, this is
<code class="filename">etc/</code> inside <a href="glossary.html#CATROOT" class="olink">CATROOT</a>.
</p></div><div class="refsect1"><a id="ConfDir_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ConfDir_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Redefining_ConfDir_3615"></a><p class="title"><strong>Example: Redefining ConfDir</strong></p><div class="example-contents"><pre class="programlisting">
ConfDir etc2
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ConfDir_notes"></a><h2>NOTES</h2><p>Make sure you don't get confused by the existence of all
<code class="option">DirConfig</code>, <code class="option">ConfDir</code> and <code class="option">ConfigDir</code>.
</p></div><div class="refsect1"><a id="ConfDir_availability"></a><h2>AVAILABILITY</h2><p>ConfDir is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ConfDir_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_543_12284"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 543</strong></p><div class="figure-contents"><pre class="screen">
['ConfDir', 'relative_dir', 'etc'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3948__context_shows_lines_3948_3962__12285"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3948 (context shows lines 3948-3962)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_relative_dir {
my($var, $value) = @_;
if (absolute_or_relative($value)) {
config_error('Path %s not allowed in %s directive',
$value, $var);
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ConfDir_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ConfDir_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ConfigAllAfter"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ConfigAllAfter — specify config files to read as part of every catalog's configuration, after all its files are read in first
</p></div><div class="refsect1"><a id="ConfigAllAfter_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>config_file</code></em>... </p></div></div><div class="refsect1"><a id="ConfigAllAfter_description"></a><h2>DESCRIPTION</h2><p>Specify configuration files to read as a part of every catalog's configuration, after all other corresponding catalog config files are processed.
</p><p>
This is useful to catch user configuration errors, supply missing values,
or force your settings over user's configuration.
</p></div><div class="refsect1"><a id="ConfigAllAfter_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="ConfigAllAfter_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ConfigAllAfter_2518"></a><p class="title"><strong>Example: Setting ConfigAllAfter</strong></p><div class="example-contents"><pre class="programlisting">
ConfigAllAfter check_actions.cfg check_variables.cfg
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ConfigAllAfter_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ConfigAllAfter_availability"></a><h2>AVAILABILITY</h2><p>ConfigAllAfter is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ConfigAllAfter_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_397_11980"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 397</strong></p><div class="figure-contents"><pre class="screen">
['ConfigAllAfter', 'root_dir_array', 'catalog_after.cfg'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3907__context_shows_lines_3907_3923__11981"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3907 (context shows lines 3907-3923)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir_array {
my($var, $value) = @_;
return [] unless $value;
no strict 'refs';
my $c = ${"Global::$var"} || [];
my @dirs = grep /\S/, Text::ParseWords::shellwords($value);
foreach my $dir (@dirs) {
$dir = "$Global::VendRoot/$dir"
unless file_name_is_absolute($dir);
$dir =~ s./+$..;
push @$c, $dir;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ConfigAllAfter_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ConfigAllAfter_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ConfigAllBefore" title="ConfigAllBefore"><span class="citerefentry"><span class="refentrytitle">ConfigAllBefore</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ConfigAllBefore"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ConfigAllBefore — specify config files to read as part of every catalog's configuration, before any of its files are read in
</p></div><div class="refsect1"><a id="ConfigAllBefore_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>config_file</code></em>... </p></div></div><div class="refsect1"><a id="ConfigAllBefore_description"></a><h2>DESCRIPTION</h2><p>Specify configuration files to read as a part of every catalog's configuration, before any other corresponding catalog config files are processed.
</p></div><div class="refsect1"><a id="ConfigAllBefore_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="ConfigAllBefore_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ConfigAllBefore_3245"></a><p class="title"><strong>Example: Setting ConfigAllBefore</strong></p><div class="example-contents"><pre class="programlisting">
ConfigAllBefore set_actions.cfg set_variables.cfg
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ConfigAllBefore_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ConfigAllBefore_availability"></a><h2>AVAILABILITY</h2><p>ConfigAllBefore is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ConfigAllBefore_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_396_12174"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 396</strong></p><div class="figure-contents"><pre class="screen">
['ConfigAllBefore', 'root_dir_array', 'catalog_before.cfg'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3907__context_shows_lines_3907_3923__12175"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3907 (context shows lines 3907-3923)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir_array {
my($var, $value) = @_;
return [] unless $value;
no strict 'refs';
my $c = ${"Global::$var"} || [];
my @dirs = grep /\S/, Text::ParseWords::shellwords($value);
foreach my $dir (@dirs) {
$dir = "$Global::VendRoot/$dir"
unless file_name_is_absolute($dir);
$dir =~ s./+$..;
push @$c, $dir;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ConfigAllBefore_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ConfigAllBefore_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ConfigAllAfter" title="ConfigAllAfter"><span class="citerefentry"><span class="refentrytitle">ConfigAllAfter</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ConfigDatabase"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ConfigDatabase — specify database holding definitions usually found in catalog.cfg
</p></div><div class="refsect1"><a id="ConfigDatabase_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>name</code></em> <em class="replaceable"><code>source_file</code></em> <em class="replaceable"><code>type</code></em> </p></div></div><div class="refsect1"><a id="ConfigDatabase_description"></a><h2>DESCRIPTION</h2><p>The directive allows one to keep the usual <code class="filename">catalog.cfg</code> definitions in a
<a href="glossary.html#database" class="olink">database</a> table.
</p><p>
By using the special option <code class="literal">LOAD</code>, it is also possible to
instruct <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to fill the <a href="glossary.html#database" class="olink">database</a> with initial data found in your
<code class="filename">catalog.cfg</code> — just make sure to remove that option on subsequent restarts.
</p></div><div class="refsect1"><a id="ConfigDatabase_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="ConfigDatabase_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_ConfigDatabase_2808"></a><p class="title"><strong>Example: Defining ConfigDatabase</strong></p><div class="example-contents"><p>You first need to create the table in an <a href="glossary.html#SQL" class="olink">SQL</a> database
that you will use to store config directives. Here's the SQL code needed:</p><pre class="programlisting">
create table config (
code varchar(32) NOT NULL PRIMARY KEY,
directive varchar(64) NOT NULL,
value varchar(255),
extended text
);
</pre><p>
Just for the record, once you have the above database table,
sample database contents of:</p><pre class="programlisting">
code|directive|value|extended
C0001|VariableDatabase|variable
C0002|SessionExpire|2 hours|
C0003|Variable|foo| bar
</pre><p>
will correspond to the usual <code class="filename">catalog.cfg</code> definitions:</p><pre class="programlisting">
VariableDatabase variable
SessionExpire 2 hours
Variable foo <<EOF
bar
EOF
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Automatically_populating_ConfigDatabase_with_initial_data_from_catalog_cfg_2809"></a><p class="title"><strong>Example: Automatically populating ConfigDatabase with initial data from catalog.cfg</strong></p><div class="example-contents"><pre class="programlisting">
ConfigDatabase config config.txt dbi:mysql:config
ConfigDatabase config LOAD 1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ConfigDatabase_notes"></a><h2>NOTES</h2><p>Even though this appears to be both global and catalog <a href="glossary.html#configuration" class="olink">configuration</a>
directive, it is only implemented on <a href="glossary.html#catalog" class="olink">catalog</a> level.
</p></div><div class="refsect1"><a id="ConfigDatabase_availability"></a><h2>AVAILABILITY</h2><p>ConfigDatabase is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ConfigDatabase_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_395_12062"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 395</strong></p><div class="figure-contents"><pre class="screen">
['ConfigDatabase', 'config_db', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_547_12063"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 547</strong></p><div class="figure-contents"><pre class="screen">
['ConfigDatabase', 'config_db', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4256__context_shows_lines_4256_4399__12064"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4256 (context shows lines 4256-4399)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_config_db {
my($name, $value) = @_;
my ($d, $new);
unless (defined $value && $value) {
$d = {};
return $d;
}
if($C) {
$d = $C->{ConfigDatabase};
}
else {
$d = $Global::ConfigDatabase;
}
my($database,$remain) = split /[\s,]+/, $value, 2;
$d->{'name'} = $database;
if(!defined $d->{'file'}) {
my($file, $type) = split /[\s,]+/, $remain, 2;
$d->{'file'} = $file;
if( $type =~ /^\d+$/ ) {
$d->{'type'} = $type;
}
elsif( $type =~ /^(dbi|sql)\b/i ) {
$d->{'type'} = 8;
if($type =~ /^dbi:/) {
$d->{DSN} = $type;
}
}
# LDAP
elsif( $type =~ /^ldap\b/i) {
$d->{'type'} = 9;
if($type =~ /^ldap:(.*)/i) {
$d->{LDAP_HOST} = $1;
}
}
# END LDAP
elsif( "\U$type" eq 'TAB' ) {
$d->{'type'} = 6;
}
elsif( "\U$type" eq 'PIPE' ) {
$d->{'type'} = 5;
}
elsif( "\U$type" eq 'CSV' ) {
$d->{'type'} = 4;
}
elsif( "\U$type" eq 'DEFAULT' ) {
$d->{'type'} = 1;
}
elsif( $type =~ /[%]{1,3}|percent/i ) {
$d->{'type'} = 3;
}
elsif( $type =~ /line/i ) {
$d->{'type'} = 2;
}
else {
$d->{'type'} = 1;
$d->{DELIMITER} = $type;
}
}
else {
my($p, $val) = split /\s+/, $remain, 2;
$p = uc $p;
if(defined $Explode_ref{$p}) {
my($ak, $v);
my(@v) = Text::ParseWords::shellwords($val);
@v = grep defined $_, @v;
$d->{$p} = {} unless defined $d->{$p};
for(@v) {
my ($sk,$v) = split /\s*=\s*/, $_;
my (@k) = grep /\w/, split /\s*,\s*/, $sk;
for my $k (@k) {
if($d->{$p}->{$k}) {
config_warn(
qq{Database %s explode parameter %s redefined to "%s", was "%s".},
$d->{name},
"$p --> $k",
$v,
$d->{$p}->{$k},
);
}
$d->{$p}->{$k} = $v;
}
}
}
elsif(defined $Hash_ref{$p}) {
my($k, $v);
my(@v) = Vend::Util::quoted_comma_string($val);
@v = grep defined $_, @v;
$d->{$p} = {} unless defined $d->{$p};
for(@v) {
($k,$v) = split /\s*=\s*/, $_;
if($d->{$p}->{$k}) {
config_warn(
qq{Database %s hash parameter %s redefined to "%s", was "%s".},
$d->{name},
"$p --> $k",
$v,
$d->{$p}->{$k},
);
}
$d->{$p}->{$k} = $v;
}
}
elsif(defined $Ary_ref{$p}) {
my(@v) = Text::ParseWords::shellwords($val);
$d->{$p} = [] unless defined $d->{$p};
push @{$d->{$p}}, @v;
}
else {
defined $d->{$p}
and ! defined $C->{DatabaseDefault}{$p}
and config_warn(
qq{Database %s scalar parameter %s redefined to "%s", was "%s".},
$d->{name},
$p,
$val,
$d->{$p},
);
$d->{$p} = $val;
}
}
#::logDebug("d object: " . uneval_it($d));
if($d->{ACTIVE} and ! $d->{OBJECT}) {
my $name = $d->{'name'};
$d->{OBJECT} = Vend::Data::import_database($d)
or config_error("Config database $name failed import.\n");
}
elsif($d->{LOAD} and ! $d->{OBJECT}) {
my $name = $d->{'name'};
$d->{OBJECT} = Vend::Data::import_database($d)
or config_error("Config database $name failed import.\n");
if( $d->{type} == 8 ) {
$d->{OBJECT}->set_query("delete from $name where 1 = 1");
}
}
return $d;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ConfigDatabase_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="ConfigDatabase_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Catalog" title="Catalog"><span class="citerefentry"><span class="refentrytitle">Catalog</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ConfigDir"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ConfigDir — specify default "include" directory for "<file" notation
</p></div><div class="refsect1"><a id="ConfigDir_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory_name</code></em> </p></div></div><div class="refsect1"><a id="ConfigDir_description"></a><h2>DESCRIPTION</h2><p>Specify the default "include" directory for files that are specified
using the <code class="literal"><filename</code> notation and have a relative
pathname. See <a class="xref" href="#ConfigDir_examples" title="EXAMPLES">the section called “EXAMPLES”</a> for clarification.
</p></div><div class="refsect1"><a id="ConfigDir_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="ConfigDir_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ConfigDir_3268"></a><p class="title"><strong>Example: Setting ConfigDir</strong></p><div class="example-contents"><pre class="programlisting">
ConfigDir variables
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_directive_value_from_a_file_3269"></a><p class="title"><strong>Example: Setting directive value from a file</strong></p><div class="example-contents"><p>In combination with the above example, the following would read the
directive value from file <code class="filename">variables/mailorderto</code>
(relative to the <a href="glossary.html#CATROOT" class="olink">CATROOT</a>, of course).</p><pre class="programlisting">
MailOrderTo <mailorderto
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ConfigDir_notes"></a><h2>NOTES</h2><p>See the <a href="glossary.html#configuration" class="olink">configuration</a> glossary entry for complete information
on <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> config file syntax.
</p><p>
Make sure you don't get confused by the existence of all
<code class="option">DirConfig</code>, <code class="option">ConfDir</code> and <code class="option">ConfigDir</code>.
</p></div><div class="refsect1"><a id="ConfigDir_availability"></a><h2>AVAILABILITY</h2><p>ConfigDir is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ConfigDir_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_393_12180"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 393</strong></p><div class="figure-contents"><pre class="screen">
['ConfigDir', undef, 'etc/lib'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_545_12181"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 545</strong></p><div class="figure-contents"><pre class="screen">
['ConfigDir', 'relative_dir', 'config'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3948__context_shows_lines_3948_3962__12182"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3948 (context shows lines 3948-3962)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_relative_dir {
my($var, $value) = @_;
if (absolute_or_relative($value)) {
config_error('Path %s not allowed in %s directive',
$value, $var);
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ConfigDir_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ConfigDir_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ConfigParseComments"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ConfigParseComments — (obsolete) treat config meta-directives as plain comments
</p></div><div class="refsect1"><a id="ConfigParseComments_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> Yes | No </p></div></div><div class="refsect1"><a id="ConfigParseComments_description"></a><h2>DESCRIPTION</h2><p>When disabled (set to <code class="literal">No</code>),
configuration meta-directives such as
<code class="literal">#include</code>,
<code class="literal">#ifdef</code> and
<code class="literal">#ifndef</code>,
are treated as pure comments with no specific meaning.
</p><p>
However, since those were originally borrowed from the C preprocessor,
and, true to their C heritage, they started with an '<code class="literal">#</code>'
(hash) character in <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> versions up to and including 4.6.
</p><p>
This was inconvenient for newcomers who were easily misguided by thinking
those were just comments, so Interchange versions 4.7 and up were changed
to use the meta-directives <span class="bold"><strong>without the hash
prefix</strong></span>.
</p></div><div class="refsect1"><a id="ConfigParseComments_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="ConfigParseComments_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Config_parser_behavior_with_ConfigParseComments_disabled_3338"></a><p class="title"><strong>Example: Config parser behavior with ConfigParseComments disabled</strong></p><div class="example-contents"><pre class="programlisting">
ConfigParseComments No
#include comment
# This, and the above line, are pure comments.
# You better prepare the file named 'comment' for the following one:
include comment
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ConfigParseComments_notes"></a><h2>NOTES</h2><p>This directive is obsolete as of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> 5.5.0, and the behavior is
as if <code class="code">ConfigParseComments No</code> was specified.
</p></div><div class="refsect1"><a id="ConfigParseComments_availability"></a><h2>AVAILABILITY</h2><p>ConfigParseComments is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ConfigParseComments_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_462_12199"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 462</strong></p><div class="figure-contents"><pre class="screen">
['ConfigParseComments', 'warn', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_583_12200"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 583</strong></p><div class="figure-contents"><pre class="screen">
['ConfigParseComments', 'warn', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2983__context_shows_lines_2983_2995__12201"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2983 (context shows lines 2983-2995)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_warn {
my($name, $val) = @_;
return '' unless $val;
::logGlobal({level => 'info'},
errmsg("Directive %s no longer supported at line %s of %s.",
$name,
$.,
$configfile,
)
);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ConfigParseComments_authors"></a><h2>AUTHORS</h2><p></p></div><div class="refsect1"><a id="ConfigParseComments_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CookieDomain"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CookieDomain — set domain common to all servers providing Interchange content
</p></div><div class="refsect1"><a id="CookieDomain_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>domain_name</code></em>... </p></div></div><div class="refsect1"><a id="CookieDomain_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the domain common to all servers providing
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> content.
</p><p>
By default, the <a href="glossary.html#session" class="olink">session</a> ID cookie domain is set to the hostname
you're accessing. For example, if you access the catalog using
server <code class="literal">myhost.mydomain.local</code>, then cookie will be set by
<code class="literal">myhost.mydomain.local</code>.
</p><p>
Things, however, go bad if you use more <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> servers
(in a non-transparent way for the user) to provide content.
For example, if SSL content was served from host
<code class="literal">ssl.mydomain.local</code>, then users would have one
session for <code class="literal">myhost.mydomain.local</code> and another for
<code class="literal">ssl.mydomain.local</code>. This is undesired, of course.
</p><p>
To fix the described problem, we need to find part of the
FQDN that is common to all servers (<code class="literal">mydomain.local</code>
in our example), and add it as the
<code class="literal">domain=</code> parameter to the
<code class="literal">Set-Cookie</code> directive that we send off to users'
browsers. That's what the <code class="option">CookieDomain</code> does.
</p><p>
<code class="option">CookieDomain</code> accepts a space-separated list of domains to set
cookies for, in which case the <code class="literal">Set-Cookie: ...</code>
is sent to the client for each of the specified domains. Due to the cookie
restrictions described in <a class="xref" href="#CookieDomain_notes" title="NOTES">the section called “NOTES”</a>,
specifying multiple domains is only rarely (if ever?) needed and
possible to implement.
</p></div><div class="refsect1"><a id="CookieDomain_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CookieDomain_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_CookieDomain_3721"></a><p class="title"><strong>Example: Specifying CookieDomain</strong></p><div class="example-contents"><pre class="programlisting">
CookieDomain .mydomain.local
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CookieDomain_notes"></a><h2>NOTES</h2><p>The cookie specification mandates that the domain part must contain
at least two fields (or 1 dot lying in between). The value
of <code class="literal">.mydomain.local</code> is valid, but <code class="literal">.local</code>
wouldn't be.
</p><p>
Furthermore, cookie source can only be the FQDN of the host itself, or
some of the subdomains, or domain it belongs to. Browsers will ignore
all cookies that do not satisfy this requirement. Host
<code class="literal">myhost.mydomain.local</code> can set a cookie for itself or the
domain <code class="literal">mydomain.local</code>, but it cannot set a cookie
for say, <code class="literal">mydomain.local2</code>. It is very fortunate we
have this protection, or unrelated sites would read and set each other's
cookies — something we definitely don't want to happen!
</p><p>
At least in Mozilla-like browsers, the domain is prefixed with a
dot even if you omit it in the <code class="option">CookieDomain</code> specification
(<code class="literal">mydomain.local</code> ends up being the same as
<code class="literal">.mydomain.local</code>).
</p><p>
For a complete discussion on cookies, see <a href="glossary.html#cookie" class="olink">cookie</a> glossary entry.
</p></div><div class="refsect1"><a id="CookieDomain_availability"></a><h2>AVAILABILITY</h2><p>CookieDomain is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CookieDomain_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_657_12311"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 657</strong></p><div class="figure-contents"><pre class="screen">
['CookieDomain', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CookieDomain_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CookieDomain_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Cookies" title="Cookies"><span class="citerefentry"><span class="refentrytitle">Cookies</span>(7ic)</span></a>, <a class="link" href="#Mall" title="Mall"><span class="citerefentry"><span class="refentrytitle">Mall</span>(7ic)</span></a>, <a class="link" href="#CookieLogin" title="CookieLogin"><span class="citerefentry"><span class="refentrytitle">CookieLogin</span>(7ic)</span></a>, <a class="link" href="#SaveExpire" title="SaveExpire"><span class="citerefentry"><span class="refentrytitle">SaveExpire</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CookieLogin"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CookieLogin — allow autologin based on username and password stored in a client cookie
</p></div><div class="refsect1"><a id="CookieLogin_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="CookieLogin_description"></a><h2>DESCRIPTION</h2><p>The directive allows <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to save users' authentication info (username/password)
in a <a href="glossary.html#cookie" class="olink">cookie</a>. Cookie expiration time is set by <code class="option">SaveExpire</code> and is
renewed each time they log in.
</p><p>
If the login and password information can be read from a cookie, then
users can be logged in to the site automatically as they visit it.
</p></div><div class="refsect1"><a id="CookieLogin_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CookieLogin_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_CookieLogin_3876"></a><p class="title"><strong>Example: Enabling CookieLogin</strong></p><div class="example-contents"><pre class="programlisting">
CookieLogin 1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CookieLogin_notes"></a><h2>NOTES</h2><p>To cause the cookie to be generated originally,
<code class="mv">mv_cookie_password</code> and/or <code class="mv">mv_cookie_username</code> must be set
to a <a href="glossary.html#true" class="olink">true</a> value.
The former causes both username and password to be saved; the latter just
the username.
</p><p>
For a complete discussion on cookies, see <a href="glossary.html#cookie" class="olink">cookie</a> glossary entry.
</p></div><div class="refsect1"><a id="CookieLogin_availability"></a><h2>AVAILABILITY</h2><p>CookieLogin is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CookieLogin_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_656_12346"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 656</strong></p><div class="figure-contents"><pre class="screen">
['CookieLogin', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12347"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CookieLogin_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CookieLogin_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CookieDomain" title="CookieDomain"><span class="citerefentry"><span class="refentrytitle">CookieDomain</span>(7ic)</span></a>, <a class="link" href="#Cookies" title="Cookies"><span class="citerefentry"><span class="refentrytitle">Cookies</span>(7ic)</span></a>, <a class="link" href="#Mall" title="Mall"><span class="citerefentry"><span class="refentrytitle">Mall</span>(7ic)</span></a>, <a class="link" href="#SaveExpire" title="SaveExpire"><span class="citerefentry"><span class="refentrytitle">SaveExpire</span>(7ic)</span></a>, <a class="link" href="#CookieName" title="CookieName"><span class="citerefentry"><span class="refentrytitle">CookieName</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CookieName"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CookieName — specify Interchange session cookie name
</p></div><div class="refsect1"><a id="CookieName_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>cookie_name</code></em> </p></div></div><div class="refsect1"><a id="CookieName_description"></a><h2>DESCRIPTION</h2><p>The directive sets the name of the Interchange <a href="glossary.html#cookie" class="olink">cookie</a> that
will be used to retrieve session ID information in users' browsers.
The default value is <code class="literal">MV_SESSION_ID</code>.
</p><p>
The default should never be changed, but this configuration directive
can save the day if you need to use cookies issued by programs other
than <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> itself.
</p></div><div class="refsect1"><a id="CookieName_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CookieName_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_CookieName_4528"></a><p class="title"><strong>Example: Defining CookieName</strong></p><div class="example-contents"><pre class="programlisting">
CookieName SESSIONID
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CookieName_notes"></a><h2>NOTES</h2><p>By default, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> cookie planted in user's browser consists of
a session ID followed by a colon followed by an IP address, username
or domain name.
</p><p>
If the cookie is generated by another program and <code class="option">CookieName</code>
is set appropriately, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> will take it over without modification.
</p><p>
For a complete discussion on cookies, see <a href="glossary.html#cookie" class="olink">cookie</a> glossary entry.
</p></div><div class="refsect1"><a id="CookieName_availability"></a><h2>AVAILABILITY</h2><p>CookieName is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CookieName_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_654_12499"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 654</strong></p><div class="figure-contents"><pre class="screen">
['CookieName', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CookieName_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CookieName_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Cookies" title="Cookies"><span class="citerefentry"><span class="refentrytitle">Cookies</span>(7ic)</span></a>, <a class="link" href="#CookiePattern" title="CookiePattern"><span class="citerefentry"><span class="refentrytitle">CookiePattern</span>(7ic)</span></a>, <a class="link" href="#CookieLogin" title="CookieLogin"><span class="citerefentry"><span class="refentrytitle">CookieLogin</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CookiePattern"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CookiePattern — specify regular expression to extract session ID out of a client cookie
</p></div><div class="refsect1"><a id="CookiePattern_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>regex_pattern</code></em> </p></div></div><div class="refsect1"><a id="CookiePattern_description"></a><h2>DESCRIPTION</h2><p>The directive sets the regular expression that <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> will use to extract
the session ID out of the client browser's <a href="glossary.html#cookie" class="olink">cookie</a>.
</p><p>
This is useful in extracting session IDs out of cookies generated by programs
other than <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>.
</p></div><div class="refsect1"><a id="CookiePattern_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CookiePattern_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_CookiePattern_4032"></a><p class="title"><strong>Example: Setting CookiePattern</strong></p><div class="example-contents"><p>The default regular expression pattern used for <code class="option">CookiePattern</code>
might work sometimes, but I find it unsuitable if you just want to change
the <code class="option">CookieName</code>, because it then breaks the usual behavior.
Here's a better value for common setups:</p><pre class="programlisting">
CookiePattern \w{8,32}
</pre><p>
In general, however, you should only modify <code class="option">CookiePattern</code> default
value if you somehow change the <span class="bold"><strong>content</strong></span>
that <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> stores in browser cookies (by say, letting other program create
the cookie).
</p><p>
For a complete discussion on cookies, see <a href="glossary.html#cookie" class="olink">cookie</a> glossary entry.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="CookiePattern_notes"></a><h2>NOTES</h2><p>By default, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> cookie planted in user's browser consists of
a session ID followed by a colon followed by an IP address, username
or domain name.
</p></div><div class="refsect1"><a id="CookiePattern_availability"></a><h2>AVAILABILITY</h2><p>CookiePattern is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CookiePattern_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_655_12379"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 655</strong></p><div class="figure-contents"><pre class="screen">
['CookiePattern', 'regex', '[-\w:.]+'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3866__context_shows_lines_3866_3878__12380"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3866 (context shows lines 3866-3878)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_regex {
my($var, $value) = @_;
eval {
my $never = 'NeVAirBE';
$never =~ m{$value};
};
if($@) {
config_error("Bad regular expression in $var.");
}
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CookiePattern_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CookiePattern_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Cookies" title="Cookies"><span class="citerefentry"><span class="refentrytitle">Cookies</span>(7ic)</span></a>, <a class="link" href="#CookieName" title="CookieName"><span class="citerefentry"><span class="refentrytitle">CookieName</span>(7ic)</span></a>, <a class="link" href="#Limit" title="Limit"><span class="citerefentry"><span class="refentrytitle">Limit</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Cookies"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Cookies — specify whether Interchange will try to send session cookies to client browsers
</p></div><div class="refsect1"><a id="Cookies_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> Yes | No </p></div></div><div class="refsect1"><a id="Cookies_description"></a><h2>DESCRIPTION</h2><p>The directive determines whether <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> will send <a href="glossary.html#cookie" class="olink">cookie</a> to the client and
read it back to keep track of <a href="glossary.html#session" class="olink">session</a> ID.
</p><p>
For a complete discussion on cookies, see <a href="glossary.html#cookie" class="olink">cookie</a> glossary entry.
</p></div><div class="refsect1"><a id="Cookies_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Cookies_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Disabling_session_cookies_3644"></a><p class="title"><strong>Example: Disabling session cookies</strong></p><div class="example-contents"><pre class="programlisting">
Cookies 0
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Cookies_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Cookies_availability"></a><h2>AVAILABILITY</h2><p>Cookies is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Cookies_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_653_12293"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 653</strong></p><div class="figure-contents"><pre class="screen">
['Cookies', 'yesno', 'Yes'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12294"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Cookies_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Cookies_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CookieDomain" title="CookieDomain"><span class="citerefentry"><span class="refentrytitle">CookieDomain</span>(7ic)</span></a>, <a class="link" href="#CookieName" title="CookieName"><span class="citerefentry"><span class="refentrytitle">CookieName</span>(7ic)</span></a>, <a class="link" href="#CookiePattern" title="CookiePattern"><span class="citerefentry"><span class="refentrytitle">CookiePattern</span>(7ic)</span></a>, <a class="link" href="#Mall" title="Mall"><span class="citerefentry"><span class="refentrytitle">Mall</span>(7ic)</span></a>, <a class="link" href="#CookieLogin" title="CookieLogin"><span class="citerefentry"><span class="refentrytitle">CookieLogin</span>(7ic)</span></a>, <a class="link" href="#SaveExpire" title="SaveExpire"><span class="citerefentry"><span class="refentrytitle">SaveExpire</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CountrySubdomains"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CountrySubdomains — honor ccTLD domains in IP qualification
</p></div><div class="refsect1"><a id="CountrySubdomains_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>country_code</code></em> <em class="replaceable"><code>ccTLD_list</code></em>... </p></div></div><div class="refsect1"><a id="CountrySubdomains_description"></a><h2>DESCRIPTION</h2><p>This directive enables <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to take <a class="ulink" href="http://en.wikipedia.org/wiki/Country_code_top-level_domain" target="_top">ccTLD</a>s into account when
<code class="option">DomainTail</code> is enabled.
</p><p>
For example, if a visit comes from an address like
"<code class="literal">machine.example.co.uk</code>" and <code class="literal">co.uk</code>
is listed as <a class="ulink" href="http://en.wikipedia.org/wiki/Country_code_top-level_domain" target="_top">ccTLD</a>, then, with
<code class="option">CountrySubdomains</code>, "<code class="literal">example.co.uk</code>" would be used
as domain tail instead of just "<code class="literal">co.uk</code>".
</p><p>
<code class="option">CountrySubdomains</code> accepts a list of country codes and their
subdomains. A predefined, ready for use configuration
block can be found in file
<a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/dist/subdomains.cfg" target="_top">dist/subdomains.cfg</a> in <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> source and
should be included from <code class="filename">interchange.cfg</code>.
</p></div><div class="refsect1"><a id="CountrySubdomains_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="CountrySubdomains_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Including_ready_made_subdomains_cfg_in_interchange_cfg_2909"></a><p class="title"><strong>Example: Including ready-made subdomains.cfg in interchange.cfg</strong></p><div class="example-contents"><pre class="programlisting">
include subdomains.cfg
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Appending_or_overwriting_entries_in_CountrySubdomains_list_2910"></a><p class="title"><strong>Example: Appending or overwriting entries in CountrySubdomains list</strong></p><div class="example-contents"><pre class="programlisting">
CountrySubdomains <<EOC
ae "ac gov mil name net org pro sch"
af "bank com edu gov hotel law music net org tv"
ag "co com org net nom"
al "com edu gov net org"
ao "co ed gv it og pb"
EOC
CountrySubdomains ar "com edu gov int mil net org" at "ac co gv or priv"
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CountrySubdomains_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="CountrySubdomains_availability"></a><h2>AVAILABILITY</h2><p>CountrySubdomains is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CountrySubdomains_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_480_12088"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 480</strong></p><div class="figure-contents"><pre class="screen">
['CountrySubdomains','hash', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12089"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CountrySubdomains_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="mailto:kevin@cursor.biz" target="_top">Kevin Walsh</a>
</p></div><div class="refsect1"><a id="CountrySubdomains_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#WideOpen" title="WideOpen"><span class="citerefentry"><span class="refentrytitle">WideOpen</span>(7ic)</span></a>, <a class="link" href="#IpHead" title="IpHead"><span class="citerefentry"><span class="refentrytitle">IpHead</span>(7ic)</span></a>, <a class="link" href="#IpQuad" title="IpQuad"><span class="citerefentry"><span class="refentrytitle">IpQuad</span>(7ic)</span></a>, <a class="link" href="#DomainTail" title="DomainTail"><span class="citerefentry"><span class="refentrytitle">DomainTail</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CreditCardAuto"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CreditCardAuto — encrypt credit card information automatically
</p></div><div class="refsect1"><a id="CreditCardAuto_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="CreditCardAuto_description"></a><h2>DESCRIPTION</h2><p>The directive enables automatic encryption and saving of credit card
information.
</p><p>
The <code class="option">EncryptProgram</code> directive must be configured and working first.
</p></div><div class="refsect1"><a id="CreditCardAuto_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CreditCardAuto_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_CreditCardAuto_3998"></a><p class="title"><strong>Example: Defining CreditCardAuto</strong></p><div class="example-contents"><pre class="programlisting">
CreditCardAuto Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CreditCardAuto_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="CreditCardAuto_availability"></a><h2>AVAILABILITY</h2><p>CreditCardAuto is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CreditCardAuto_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_668_12372"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 668</strong></p><div class="figure-contents"><pre class="screen">
['CreditCardAuto', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12373"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CreditCardAuto_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CreditCardAuto_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#WideOpen" title="WideOpen"><span class="citerefentry"><span class="refentrytitle">WideOpen</span>(7ic)</span></a>, <a class="link" href="#PGP" title="PGP"><span class="citerefentry"><span class="refentrytitle">PGP</span>(7ic)</span></a>, <a class="link" href="#LockoutCommand" title="LockoutCommand"><span class="citerefentry"><span class="refentrytitle">LockoutCommand</span>(7ic)</span></a>, <a class="link" href="#EncryptProgram" title="EncryptProgram"><span class="citerefentry"><span class="refentrytitle">EncryptProgram</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="CustomShipping"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CustomShipping — specify SQL query to use in obtaining shipping costs data
</p></div><div class="refsect1"><a id="CustomShipping_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>SQL_query</code></em> </p></div></div><div class="refsect1"><a id="CustomShipping_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the <a href="glossary.html#SQL" class="olink">SQL</a> query to use in obtaining
data for <a href="glossary.html#shipping" class="olink">shipping</a> costs calculation.
</p><p>
The <a href="glossary.html#SQL" class="olink">SQL</a> query must start with <code class="literal">select </code>
(case insensitive), or the directive is ignored. If no rows are returned
from the query, an appropriate error message is issued.
</p></div><div class="refsect1"><a id="CustomShipping_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="CustomShipping_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_CustomShipping_4488"></a><p class="title"><strong>Example: Specifying CustomShipping</strong></p><div class="example-contents"><pre class="programlisting">
CustomShipping select * from shipping
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="CustomShipping_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="CustomShipping_availability"></a><h2>AVAILABILITY</h2><p>CustomShipping is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="CustomShipping_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_690_12491"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 690</strong></p><div class="figure-contents"><pre class="screen">
['CustomShipping', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="CustomShipping_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="CustomShipping_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DNSBL"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DNSBL — specify real-time DNS blocklist servers
</p></div><div class="refsect1"><a id="DNSBL_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>hostname</code></em>... </p></div></div><div class="refsect1"><a id="DNSBL_description"></a><h2>DESCRIPTION</h2><p>The directive allows definition of realtime blocklist servers (special-purpose
DNS servers) that should be contacted in order to verify client IP address
"validity". This way, you can deny access to known-bad clients (such
as ones coming in from open proxy servers).
</p><p>
Many fraudulent credit card orders are placed from open proxy machines
to hide the actual identity of the criminal, so denying access to
open-proxy visitors might be a good idea.
</p></div><div class="refsect1"><a id="DNSBL_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DNSBL_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_DNSBL_2566"></a><p class="title"><strong>Example: Defining DNSBL</strong></p><div class="example-contents"><pre class="programlisting">
DNSBL opm.blitzed.org cbl.abuseat.org sbl-xbl.spamhaus.org
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DNSBL_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="DNSBL_availability"></a><h2>AVAILABILITY</h2><p>DNSBL is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DNSBL_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_483_11994"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 483</strong></p><div class="figure-contents"><pre class="screen">
['DNSBL', 'array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3755__context_shows_lines_3755_3775__11995"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3755 (context shows lines 3755-3775)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_array {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || [];
}
else {
no strict 'refs';
$c = ${"Global::$item"} || [];
}
for (@setting) {
check_legal($item, $_);
push @{$c}, $_;
}
$c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DNSBL_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DNSBL_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#HammerLock" title="HammerLock"><span class="citerefentry"><span class="refentrytitle">HammerLock</span>(7ic)</span></a>, <a class="link" href="#LockoutCommand" title="LockoutCommand"><span class="citerefentry"><span class="refentrytitle">LockoutCommand</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DataTrace"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DataTrace — trace DBI calls with variable granularity
</p></div><div class="refsect1"><a id="DataTrace_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>granularity</code></em> </p></div></div><div class="refsect1"><a id="DataTrace_description"></a><h2>DESCRIPTION</h2><p>Trace <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> DBI calls with variable granularity.
As this tends to produce large amounts of output, only use it if
there's a strong chance that your problem is related to DBI.
</p><p>
Setting of <code class="literal">0</code> disables tracing.<br />
Setting of <code class="literal">1</code> traces DBI method calls with return values (or errors).<br />
Setting of <code class="literal">2</code> traces as (1) plus the parameters used in method calls.<br />
Setting of <code class="literal">3</code> traces as (2) plus some high-level information from the driver, and some internal information from the DBI<br />
Setting of <code class="literal">4</code> traces as (3) plus more detailed information from the driver. Also includes DBI mutex information when using threaded Perl<br />
Setting of <code class="literal">5</code> traces as (4) plus more and more obscure information.<br />
</p><p>
Trace level of <code class="literal">1</code> is suitable in most situations.
</p></div><div class="refsect1"><a id="DataTrace_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DataTrace_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_DataTrace_3331"></a><p class="title"><strong>Example: Enabling DataTrace</strong></p><div class="example-contents"><pre class="programlisting">
Variable DEBUG 1
DebugFile /tmp/icdebug
DataTrace 1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DataTrace_notes"></a><h2>NOTES</h2><p>Keep in mind that, since the trace output is directed to the debug file,
you need to have the <code class="varname">DEBUG</code> global variable
defined, and <code class="option">DebugFile</code> properly set.
</p></div><div class="refsect1"><a id="DataTrace_availability"></a><h2>AVAILABILITY</h2><p>DataTrace is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DataTrace_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_503_12197"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 503</strong></p><div class="figure-contents"><pre class="screen">
['DataTrace', 'integer', 0],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3965__context_shows_lines_3965_3972__12198"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3965 (context shows lines 3965-3972)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_integer {
my($var, $value) = @_;
$value = hex($value) if $value =~ /^0x[\dA-Fa-f]+$/;
$value = oct($value) if $value =~ /^0[0-7]+$/;
config_error("The $var directive (now set to '$value') must be an integer\n")
unless $value =~ /^\d+$/;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DataTrace_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DataTrace_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DebugFile" title="DebugFile"><span class="citerefentry"><span class="refentrytitle">DebugFile</span>(7ic)</span></a>, <a href="vars.html#DEBUG" class="olink"><span class="citerefentry"><span class="refentrytitle">DEBUG</span>(7ic)</span></a>, <a class="link" href="#DumpStructure" title="DumpStructure"><span class="citerefentry"><span class="refentrytitle">DumpStructure</span>(7ic)</span></a>, <a class="link" href="#EncryptProgram" title="EncryptProgram"><span class="citerefentry"><span class="refentrytitle">EncryptProgram</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Database"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Database — register existing database table for use with Interchange
</p></div><div class="refsect1"><a id="Database_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>table_name</code></em> <em class="replaceable"><code>table_source_file</code></em> <em class="replaceable"><code>table_type</code></em> <br /> <em class="replaceable"><code>table_name</code></em> <em class="replaceable"><code>attribute</code></em> <em class="replaceable"><code>value</code></em> </p></div></div><div class="refsect1"><a id="Database_description"></a><h2>DESCRIPTION</h2><p></p><p>
The directive registers a database table for use with <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>.
<code class="literal">table_name</code> specifies an arbitrary name — name
that will be used to refer to the table within <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>. Names can be composed
of alphanumeric characters including underscore, and we recommend they're in
all lower- or upper-case.
</p><p>
<code class="literal">source_file</code> specifies the initial database text
source file, and <code class="literal">type</code> specifies database format.
</p><p>
For more about <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> and databases, and supported formats, see <a href="glossary.html#database" class="olink">database</a>
glossary entry.
</p></div><div class="refsect1"><a id="Database_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="Database_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Default__most_basic_products_database_2774"></a><p class="title"><strong>Example: Default, most basic products database</strong></p><div class="example-contents"><pre class="programlisting">
Database products products.txt TAB
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Simple_definition_of_a_CSV_style_database_source_format_2775"></a><p class="title"><strong>Example: Simple definition of a CSV-style database source format</strong></p><div class="example-contents"><pre class="programlisting">
Database reviews reviews.txt CSV
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Automatically_configure_all_tables_from_an_existing_PostgreSQL_database_2776"></a><p class="title"><strong>Example: Automatically configure all tables from an existing PostgreSQL database</strong></p><div class="example-contents"><pre class="programlisting">
DatabaseAutoIgnore ^sql_
DatabaseAuto __SQLDSN__
NoImportExternal Yes
</pre><p>
For further discussion, see <code class="option">DatabaseAuto</code>.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Definition_of_a_Postgres_database_table_2777"></a><p class="title"><strong>Example: Definition of a Postgres database table</strong></p><div class="example-contents"><pre class="programlisting">
#
# Required for PostgreSQL
#
Require module DBI
Require module DBD::Pg
Variable SQLDSN dbi:Pg:dbname=database_name
Variable SQLUSER username
Variable SQLPASS password
Variable SOME_DATABASE 1
<ParseVariables Yes>
DatabaseDefault USER __SQLUSER__
DatabaseDefault PASS __SQLPASS__
DatabaseDefault NO_ASCII_INDEX 1
Message -i -n Using PostgreSQL, DSN=__SQLDSN__...
#
# Individual database table definitions
#
Database table_name table_name.txt __SQLDSN__
</ParseVariables>
#
# Optional table descriptions
#
Database table_name LENGTH_EXCEPTION_DEFAULT truncate_log
Database table_name DEFAULT_TYPE varchar(255)
Database table_name KEY sku
Database table_name HIDE_FIELD inactive
Database table_name COLUMN_DEF "sku=varchar(64) NOT NULL PRIMARY KEY"
Database table_name COLUMN_DEF "description=varchar(128)"
Database table_name COLUMN_DEF "price=varchar(12)"
Database table_name INDEX description
Database table_name INDEX price
</pre><p>
For the above example to work, you will need file <code class="literal"><em class="replaceable"><code>table_name.txt</code></em></code> present within <code class="option">ProductDir</code>, containing the initial data set for the table. If there's no initial data set and the table should be empty, the file still needs to contain a single line with three column names, separated by a TAB:</p><pre class="programlisting">
sku description price
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Database_notes"></a><h2>NOTES</h2><p>In <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>, words <code class="literal">table</code> and <code class="literal">database</code>
are used to refer to the same thing — database table.
</p><p>
Defining databases on an <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> (global) level
<span class="bold"><strong>won't work</strong></span>. If you want to share
databases among catalogs, define them in each <code class="filename">catalog.cfg</code> separately (possibly
by including the generic file with <code class="option">Database</code> definitions).
</p></div><div class="refsect1"><a id="Database_availability"></a><h2>AVAILABILITY</h2><p>Database is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Database_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_469_12054"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 469</strong></p><div class="figure-contents"><pre class="screen">
['Database', 'database', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_589_12055"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 589</strong></p><div class="figure-contents"><pre class="screen">
['Database', 'database', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4414__context_shows_lines_4414_4611__12056"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4414 (context shows lines 4414-4611)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_database {
my ($var, $value) = @_;
my ($c, $new);
if (! $value) {
$c = {};
return $c;
}
$c = $C ? $C->{Database} : $Global::Database;
my($database,$remain) = split /[\s,]+/, $value, 2;
if( ! defined $c->{$database} ) {
$c->{$database} = { 'name' => $database, included_from => $configfile };
$new = 1;
}
my $d = $c->{$database};
if($new) {
my($file, $type) = split /[\s,]+/, $remain, 2;
$d->{'file'} = $file;
if($file eq 'AUTO_SEQUENCE') {
# database table missing for AUTO_SEQUENCE directive
config_error('Missing database %s for AUTO_SEQUENCE %s.', $database, $type);
return $c;
}
if( $type =~ /^\d+$/ ) {
$d->{'type'} = $type;
}
elsif( $type =~ /^(dbi|sql)\b/i ) {
$d->{'type'} = 8;
if($type =~ /^dbi:/) {
$d->{DSN} = $type;
}
}
# LDAP
elsif( $type =~ /^ldap\b/i) {
$d->{'type'} = 9;
if($type =~ /^ldap:(.*)/i) {
$d->{LDAP_HOST} = $1;
}
}
# END LDAP
elsif( $type =~ /^ic:(\w*)(:(.*))?/ ) {
my $class = $1;
my $dir = $3;
$d->{DIR} = $dir if $dir;
if($class =~ /^default$/i) {
# Do nothing
}
elsif($class) {
$class = uc $class;
if(! $Vend::Data::db_config{$class}) {
config_error("unrecognized IC database class: %s (from %s)", $class, $type);
}
$d->{Class} = $class;
}
$d->{'type'} = 6;
}
elsif( "\U$type" eq 'TAB' ) {
$d->{'type'} = 6;
}
elsif( "\U$type" eq 'PIPE' ) {
$d->{'type'} = 5;
}
elsif( "\U$type" eq 'CSV' ) {
$d->{'type'} = 4;
}
elsif( "\U$type" eq 'DEFAULT' ) {
$d->{'type'} = 1;
}
elsif( $type =~ /[%]{1,3}|percent/i ) {
$d->{'type'} = 3;
}
elsif( $type =~ /line/i ) {
$d->{'type'} = 2;
}
else {
$d->{'type'} = 1;
$d->{DELIMITER} = $type;
}
if ($d->{'type'} eq '8') { $d->{Class} = 'DBI' }
elsif ($d->{'type'} eq '9') { $d->{Class} = 'LDAP' }
else { $d->{Class} ||= $Global::Default_database }
if($C and $C->{DatabaseDefault}) {
while ( my($k, $v) = each %{$C->{DatabaseDefault}}) {
$d->{$k} = $v;
}
}
$d->{HOT} = 1 if $d->{Class} eq 'MEMORY';
#::logDebug("parse_database: type $type -> $d->{type}");
}
else {
my($p, $val) = split /\s+/, $remain, 2;
$p = uc $p;
#::logDebug("parse_database: parameter $p = $val");
if(defined $Explode_ref{$p}) {
my($ak, $v);
$val =~ s/,+$//;
$val =~ s/^,+//;
my(@v) = Text::ParseWords::shellwords($val);
@v = grep length $_, @v;
$d->{$p} = {} unless defined $d->{$p};
for(@v) {
my ($sk,$v) = split /\s*=\s*/, $_;
my (@k) = grep /\w/, split /\s*,\s*/, $sk;
for my $k (@k) {
if($d->{$p}->{$k}) {
config_warn(
qq{Database %s explode parameter %s redefined to "%s", was "%s".},
$d->{name},
"$p --> $k",
$v,
$d->{$p}->{$k},
);
}
$d->{$p}->{$k} = $v;
}
}
}
elsif(defined $Hash_ref{$p}) {
my($k, $v);
my(@v) = Vend::Util::quoted_comma_string($val);
@v = grep defined $_, @v;
$d->{$p} = {} unless defined $d->{$p};
for(@v) {
($k,$v) = split /\s*=\s*/, $_;
if($d->{$p}->{$k}) {
config_warn(
qq{Database %s hash parameter %s redefined to "%s", was "%s".},
$d->{name},
"$p --> $k",
$v,
$d->{$p}->{$k},
);
}
$d->{$p}->{$k} = $v;
}
}
elsif(defined $Ary_ref{$p}) {
my(@v) = Text::ParseWords::shellwords($val);
$d->{$p} = [] unless defined $d->{$p};
push @{$d->{$p}}, @v;
}
elsif ($p eq 'COMPOSITE_KEY') {
## Magic hardcode
if($d->{type} == 8) {
$d->{Class} = 'DBI_CompositeKey';
$d->{$p} = $val;
}
else {
config_warn(
'Database %s parameter in type with no handling. Ignored.',
$p,
);
}
}
elsif ($p eq 'CLASS') {
$d->{Class} = $val;
}
elsif ($p =~ /^(MEMORY|SDBM|GDBM|DB_FILE|LDAP)$/i) {
$d->{Class} = uc $p;
}
elsif ($p eq 'ALIAS') {
if (defined $c->{$val}) {
config_warn("Database '%s' already exists, can't alias.", $val);
}
else {
$c->{$val} = $d;
}
}
elsif ($p =~ /^MAP/) {
Vend::Table::Shadow::_parse_config_line ($d, $p, $val);
}
else {
defined $d->{$p}
and ! defined $C->{DatabaseDefault}{$p}
and
config_warn(
qq{Database %s scalar parameter %s redefined to "%s", was "%s".},
$d->{name},
$p,
$val,
$d->{$p},
);
$d->{$p} = $val;
}
$d->{HOT} = 1 if $d->{Class} eq 'MEMORY';
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Database_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Database_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DatabaseDefault" title="DatabaseDefault"><span class="citerefentry"><span class="refentrytitle">DatabaseDefault</span>(7ic)</span></a>, <a href="tags.html#data" class="olink"><span class="citerefentry"><span class="refentrytitle">data</span>(7ic)</span></a>, <a class="link" href="#TableRestrict" title="TableRestrict"><span class="citerefentry"><span class="refentrytitle">TableRestrict</span>(7ic)</span></a>, <a class="link" href="#DatabaseAuto" title="DatabaseAuto"><span class="citerefentry"><span class="refentrytitle">DatabaseAuto</span>(7ic)</span></a>, <a class="link" href="#UserDB" title="UserDB"><span class="citerefentry"><span class="refentrytitle">UserDB</span>(7ic)</span></a>, <a class="link" href="#DirectiveDatabase" title="DirectiveDatabase"><span class="citerefentry"><span class="refentrytitle">DirectiveDatabase</span>(7ic)</span></a>, <a class="link" href="#DatabaseAutoIgnore" title="DatabaseAutoIgnore"><span class="citerefentry"><span class="refentrytitle">DatabaseAutoIgnore</span>(7ic)</span></a>, <a class="link" href="#UserDatabase" title="UserDatabase"><span class="citerefentry"><span class="refentrytitle">UserDatabase</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DatabaseAuto"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DatabaseAuto — register database tables for use with Interchange automatically
</p></div><div class="refsect1"><a id="DatabaseAuto_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>DSN</code></em> <em class="replaceable"><code>username</code></em> <em class="replaceable"><code>password</code></em> [
<em class="replaceable"><code>catalog</code></em>
[
<em class="replaceable"><code>schema</code></em>
[
<em class="replaceable"><code>name</code></em>
[
<em class="replaceable"><code>type</code></em>
]
]
]
]</p></div></div><div class="refsect1"><a id="DatabaseAuto_description"></a><h2>DESCRIPTION</h2><p>The directive automatically registers database tables found for use with <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>.
</p><p>
This only works for <a href="glossary.html#SQL" class="olink">SQL</a> databases, and the parameters provided to
<code class="option">DatabaseAuto</code> are used to establish the connection to the database.
</p><p>
For example, a setting of
</p><pre class="programlisting">
DatabaseAuto dbi:<em class="replaceable"><code>mysql:test_foundation interch pass</code></em>
</pre><p>
would do the equivalent of:
</p><pre class="programlisting">
NoImport <em class="replaceable"><code>TABLENAME</code></em>
Database <em class="replaceable"><code>TABLENAME</code></em> <em class="replaceable"><code>TABLENAME</code></em>.txt dbi:<em class="replaceable"><code>mysql:test_foundation</code></em>
Database <em class="replaceable"><code>TABLENAME</code></em> USER <em class="replaceable"><code>interch</code></em>
Database <em class="replaceable"><code>TABLENAME</code></em> PASS <em class="replaceable"><code>pass</code></em>
</pre><p>
for every table (and not view, by default) found in the database
<span class="database">test_foundation</span>.
</p><p>
Any additional space-separated arguments are passed to DBI's
<code class="literal">table_info</code>
method as the <code class="literal">catalog</code>, <code class="literal">schema</code>,
<code class="literal">name</code>, and <code class="literal">type</code> (optionally quoted in
shell syntax). Since order is significant, you could use <code class="literal">''</code>
to skip values.
</p><p>
Currently, the <code class="literal">catalog</code> argument is not used by any
database driver, but it
may be in the future. The other options (<code class="literal">schema</code>,
<code class="literal">name</code> and <code class="literal">type</code>) are database-specific;
see the DBI manual, appropriate DBD manual and
<a class="xref" href="#DatabaseAuto_examples" title="EXAMPLES">the section called “EXAMPLES”</a> for details and examples.
</p><p>
If the <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> module <code class="classname">DBIx::DBSchema</code> was found,
it would also dump the specification needed to re-create the table structures
(just like the <code class="literal">CREATE_SQL</code> parameter to <code class="option">Database</code>):
</p><pre class="programlisting">
Database <em class="replaceable"><code>TABLENAME</code></em> CREATE_SQL CREATE TABLE <em class="replaceable"><code>TABLENAME ( ...)</code></em>
</pre><p>
</p><p>
This information is available in <code class="varname">$Vend:Cfg</code> (global
context) or <code class="varname">$Config</code> (catalog context) and it is
trivial to dump it to the screen or file.
See <a class="xref" href="#DatabaseAuto_examples" title="EXAMPLES">the section called “EXAMPLES”</a>.
</p></div><div class="refsect1"><a id="DatabaseAuto_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DatabaseAuto_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Standard_DatabaseAuto_definition__a_standalone_example_3691"></a><p class="title"><strong>Example: Standard DatabaseAuto definition, a standalone example</strong></p><div class="example-contents"><p>First, make sure MySQL is installed, then connect to it as root (using the
<span class="command"><strong>mysql</strong></span> command-line tool), and issue the following
commands to both create a sample database and allow access to it:</p><pre class="programlisting">
create database interchange;
use interchange;
create table table1(code INT, price INT, description VARCHAR(60));
create table table2(code INT, price INT, description VARCHAR(60));
create table table3(code INT, price INT, description VARCHAR(60));
create table table4(code INT, price INT, description VARCHAR(60));
grant all privileges on interchange.* to interchange@localhost identified by 'pass';
</pre><p>
Add the following to your <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
DatabaseAuto dbi:mysql:interchange interchange pass
</pre><p>
At <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> restart or catalog reconfiguration time, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> should discover the
tables in the database and make them available for use.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Getting_a_dump_of__Vend__Cfg_and_extracting_table_creation_commands_3692"></a><p class="title"><strong>Example: Getting a dump of $Vend::Cfg and extracting table creation commands</strong></p><div class="example-contents"><p>If <code class="classname">DBIx::DBSchema</code> <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> module is installed, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>
is able to produce the commands that you need to run to recreate the structure
of the database tables. This can be useful for backup purposes and remote
copying, or just to get the layout, tune it to your needs, insert literally in
<code class="filename">catalog.cfg</code> and finally turn off <code class="option">DatabaseAuto</code>.
</p><p>
So first of all, implement the above base example.
</p><p>
Then make sure the <code class="classname">DBIx::DBSchema</code> module is
installed by making <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> fail to configure the catalog if it's missing —
add the following to your <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
Require module DBIx::DBSchema
</pre><p>
Then, to dump <code class="literal">CREATE_TABLE</code> sequence for say,
<span class="database">table1</span>, add the following to a separate Interchange page:</p><pre class="programlisting">
Creation sequence:
<pre>
[perl] $Config->{Database}->{table1}->{CREATE_SQL}; [/perl]
</pre>
</pre><p>
Alternatively, to dump the complete <code class="varname">$Vend::Cfg</code> structure,
you could create a "<code class="literal">cfgdump</code>" usertag (see
<code class="literal">dump-vend-structure</code>).
Then you could simply restart <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> and call
<code class="code"><pre>[cfgdump]</pre></code> in any <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> page, and search
for <span class="database">table1</span> in the output.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Specifying_PostgreSQL_schema_3693"></a><p class="title"><strong>Example: Specifying PostgreSQL schema</strong></p><div class="example-contents"><p>The following setting for <a class="ulink" href="http://www.postgresql.org/" target="_top">PostgreSQL</a> would make <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> only see the tables
in the <code class="literal">public</code> schema of a database, and not in
any other schemas.</p><pre class="programlisting">
DatabaseAuto dbi:Pg:dbname=DBNAME USERNAME PASSWORD '' public
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Making_Interchange_recognize_views_3694"></a><p class="title"><strong>Example: Making Interchange recognize views</strong></p><div class="example-contents"><pre class="programlisting">
DatabaseAuto dbi:Pg:dbname=DBNAME USERNAME PASSWORD '' public '' VIEW
</pre><p>
(The <code class="literal">VIEW</code> argument should be passed as shown
— literally and in uppercase).
</p></div></div><br class="example-break" /><div class="example"><a id="example_Automatically_configure_all_tables_from_an_existing_PostgreSQL_database_3695"></a><p class="title"><strong>Example: Automatically configure all tables from an existing PostgreSQL database</strong></p><div class="example-contents"><pre class="programlisting">
Variable SQLDSN dbi:Pg:dbname=DATABASE_NAME
DatabaseAutoIgnore ^sql_
DatabaseAuto __SQLDSN__
NoImportExternal Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DatabaseAuto_notes"></a><h2>NOTES</h2><p></p><p>
For more about <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> and databases, and supported formats, see <a href="glossary.html#database" class="olink">database</a>
glossary entry.
</p><p>
The <code class="literal">schema</code> argument to this directive can be specified when
you want to avoid using the <code class="option">DatabaseAutoIgnore</code> directive (it's drawback
is that it could easily ignore more tables than you really intended).
</p><p>
Also be aware that it is possible to make some confusing configuration mistakes
here, if the schema you specify is not in the database user's
<code class="literal">SEARCH_PATH</code> session variable,
or comes after some other schema that has tables with the same names.
</p></div><div class="refsect1"><a id="DatabaseAuto_availability"></a><h2>AVAILABILITY</h2><p>DatabaseAuto is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DatabaseAuto_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_587_12303"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 587</strong></p><div class="figure-contents"><pre class="screen">
['DatabaseAuto', 'dbauto', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4401__context_shows_lines_4401_4412__12304"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4401 (context shows lines 4401-4412)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_dbauto {
my ($var, $value) = @_;
return '' unless $value;
my @inc = Vend::Table::DBI::auto_config($value);
my %noed;
for(@inc) {
my ($t, $thing) = @$_;
parse_boolean('NoImport', $t) unless $noed{$t}++;
parse_database('Database', "$t $thing");
}
return 1;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DatabaseAuto_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="DatabaseAuto_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DatabaseDefault" title="DatabaseDefault"><span class="citerefentry"><span class="refentrytitle">DatabaseDefault</span>(7ic)</span></a>, <a class="link" href="#Database" title="Database"><span class="citerefentry"><span class="refentrytitle">Database</span>(7ic)</span></a>, <a class="link" href="#DatabaseAutoIgnore" title="DatabaseAutoIgnore"><span class="citerefentry"><span class="refentrytitle">DatabaseAutoIgnore</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DatabaseAutoIgnore"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DatabaseAutoIgnore — prevent DatabaseAuto from configuring tables whose names match regex pattern
</p></div><div class="refsect1"><a id="DatabaseAutoIgnore_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>regexp</code></em> </p></div></div><div class="refsect1"><a id="DatabaseAutoIgnore_description"></a><h2>DESCRIPTION</h2><p>The directive allows <a href="glossary.html#regexp" class="olink">regexp</a> specification of an "ignore list" that
prevents <code class="option">DatabaseAuto</code> from automatically configuring
<span class="emphasis"><em>all</em></span> tables found. (For example, you will want
to exclude tables in non-default schemas.)
</p><p>
A loose regex specification can easily ignore more tables than you
intended, and if the goal is just using tables from the public schema, you
might prefer specifying <code class="literal">schema</code> argument to
<code class="option">DatabaseAuto</code> directly.
</p></div><div class="refsect1"><a id="DatabaseAutoIgnore_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DatabaseAutoIgnore_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_DatabaseAutoIgnore_4153"></a><p class="title"><strong>Example: Specifying DatabaseAutoIgnore</strong></p><div class="example-contents"><p>This prevents <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> from bringing in tables in non-default schemas
in <a class="ulink" href="http://www.postgresql.org/" target="_top">PostgreSQL</a> 7.4 and newer.</p><pre class="programlisting">
DatabaseAutoIgnore ^sql_
DatabaseAuto dbi:Pg:dbname=DBNAME;host=PGHOST
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DatabaseAutoIgnore_notes"></a><h2>NOTES</h2><p>This directive must be set before <code class="option">DatabaseAuto</code> to have a meaningful
effect.
</p><p>
For more about <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> and databases, and supported formats, see <a href="glossary.html#database" class="olink">database</a>
glossary entry.
</p></div><div class="refsect1"><a id="DatabaseAutoIgnore_availability"></a><h2>AVAILABILITY</h2><p>DatabaseAutoIgnore is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DatabaseAutoIgnore_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_588_12407"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 588</strong></p><div class="figure-contents"><pre class="screen">
['DatabaseAutoIgnore', 'regex', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3866__context_shows_lines_3866_3878__12408"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3866 (context shows lines 3866-3878)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_regex {
my($var, $value) = @_;
eval {
my $never = 'NeVAirBE';
$never =~ m{$value};
};
if($@) {
config_error("Bad regular expression in $var.");
}
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DatabaseAutoIgnore_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="DatabaseAutoIgnore_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Database" title="Database"><span class="citerefentry"><span class="refentrytitle">Database</span>(7ic)</span></a>, <a class="link" href="#DatabaseAuto" title="DatabaseAuto"><span class="citerefentry"><span class="refentrytitle">DatabaseAuto</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DatabaseDefault"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DatabaseDefault — specify default settings for Database directives
</p></div><div class="refsect1"><a id="DatabaseDefault_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>key</code></em> <em class="replaceable"><code>value</code></em>... </p></div></div><div class="refsect1"><a id="DatabaseDefault_description"></a><h2>DESCRIPTION</h2><p>The directive defines default parameters for a database.
</p><p>
For a list of possible parameters (keys), see the <code class="option">Database</code> directive.
</p><p>
<code class="option">DatabaseDefault</code> accepts scalar keys, which actually
means all from the list above <span class="bold"><strong>except</strong></span>:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
ALTERNATE_*
</p></li><li class="listitem"><p>
BINARY
</p></li><li class="listitem"><p>
COLUMN_DEF
</p></li><li class="listitem"><p>
DEFAULT
</p></li><li class="listitem"><p>
FIELD_ALIAS
</p></li><li class="listitem"><p>
FILTER_*
</p></li><li class="listitem"><p>
NAME
</p></li><li class="listitem"><p>
NUMERIC
</p></li><li class="listitem"><p>
POSTCREATE
</p></li><li class="listitem"><p>
WRITE_CATALOG
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="DatabaseDefault_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DatabaseDefault_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specify_default_SQL_connection_username_and_password_4396"></a><p class="title"><strong>Example: Specify default SQL connection username and password</strong></p><div class="example-contents"><p>Most <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> applications use only one <a href="glossary.html#SQL" class="olink">SQL</a> database. In that case,
it is handy to specify the default SQL username and password once, instead of
repeating it for each table separately.
Here's a possible <code class="filename">catalog.cfg</code> setting:</p><pre class="programlisting">
DatabaseDefault USER interchange
DatabaseDefault PASS nevairbe
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Specifying_WRITE_CONTROL_and_WRITE_TAGGED_defaults_4397"></a><p class="title"><strong>Example: Specifying WRITE_CONTROL and WRITE_TAGGED defaults</strong></p><div class="example-contents"><pre class="programlisting">
DatabaseDefault WRITE_CONTROL 1
DatabaseDefault WRITE_TAGGED 1
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Specifying_defaults_in_here_document_style_4398"></a><p class="title"><strong>Example: Specifying defaults in here-document style</strong></p><div class="example-contents"><pre class="programlisting">
DatabaseDefault <<EOD
WRITE_CONTROL 1
WRITE_TAGGED 1
HIDE_AUTO_FILES 1
EOD
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Clearing_default_values_4399"></a><p class="title"><strong>Example: Clearing default values</strong></p><div class="example-contents"><pre class="programlisting">
Replace DatabaseDefault
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Prevent_display_of_database_errors_on_the_storefront_4400"></a><p class="title"><strong>Example: Prevent display of database errors on the storefront</strong></p><div class="example-contents"><pre class="programlisting">
DatabaseDefault LOG_ERROR_SESSION 0
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DatabaseDefault_notes"></a><h2>NOTES</h2><p>Those default settings are made when the table is initially defined, so explicit
settings for the database itself override the defaults, of course.
</p><p>
To have the intended effect, this directive must be set before the appropriate
databases are defined with the <code class="option">Database</code> directive.
</p><p>
For a way to clear definitions, use the <code class="option">Replace</code> directive.
</p></div><div class="refsect1"><a id="DatabaseDefault_availability"></a><h2>AVAILABILITY</h2><p>DatabaseDefault is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DatabaseDefault_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_586_12471"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 586</strong></p><div class="figure-contents"><pre class="screen">
['DatabaseDefault', 'hash', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12472"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DatabaseDefault_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DatabaseDefault_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Replace" title="Replace"><span class="citerefentry"><span class="refentrytitle">Replace</span>(7ic)</span></a>, <a class="link" href="#Database" title="Database"><span class="citerefentry"><span class="refentrytitle">Database</span>(7ic)</span></a>, <a class="link" href="#DatabaseAuto" title="DatabaseAuto"><span class="citerefentry"><span class="refentrytitle">DatabaseAuto</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DebugFile"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DebugFile — specify Interchange debug output filename
</p></div><div class="refsect1"><a id="DebugFile_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="DebugFile_description"></a><h2>DESCRIPTION</h2><p>Specify the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> debug output file. If the filename is not absolute,
it is treated relative to the Interchange root directory (<a href="glossary.html#ICROOT" class="olink">ICROOT</a>).
</p><p>
When enabled, the debug file will gather output of the
<code class="function">::logDebug()</code> Interchange statements and <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> warnings
(if they are enabled).
</p></div><div class="refsect1"><a id="DebugFile_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DebugFile_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_DebugFile_2848"></a><p class="title"><strong>Example: Setting DebugFile</strong></p><div class="example-contents"><pre class="programlisting">
Variable DEBUG 1
DebugFile /tmp/icdebug
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DebugFile_notes"></a><h2>NOTES</h2><p>Keep in mind that
you need to have the <code class="varname">DEBUG</code> global variable
defined.
</p><p>
Also, as the <code class="function">::logDebug()</code> statements are disabled
(commented)
by default in Interchange sources, you'll probably want to use a special
script for managing debug statements, or manually uncomment parts of
debugging code in question (and restart Interchange, of course —
see <a href="howtos.html#daemon-control" class="olink">Q: </a>).
</p></div><div class="refsect1"><a id="DebugFile_availability"></a><h2>AVAILABILITY</h2><p>DebugFile is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DebugFile_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_391_12072"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 391</strong></p><div class="figure-contents"><pre class="screen">
['DebugFile', 'root_dir', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3898__context_shows_lines_3898_3905__12073"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3898 (context shows lines 3898-3905)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir {
my($var, $value) = @_;
return '' unless $value;
$value = "$Global::VendRoot/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DebugFile_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DebugFile_seeAlso"></a><h2>SEE ALSO</h2><p><a href="vars.html#DEBUG" class="olink"><span class="citerefentry"><span class="refentrytitle">DEBUG</span>(7ic)</span></a>, <a class="link" href="#ShowTimes" title="ShowTimes"><span class="citerefentry"><span class="refentrytitle">ShowTimes</span>(7ic)</span></a>, <a class="link" href="#DataTrace" title="DataTrace"><span class="citerefentry"><span class="refentrytitle">DataTrace</span>(7ic)</span></a>, <a class="link" href="#EncryptProgram" title="EncryptProgram"><span class="citerefentry"><span class="refentrytitle">EncryptProgram</span>(7ic)</span></a>, <a class="link" href="#DebugTemplate" title="DebugTemplate"><span class="citerefentry"><span class="refentrytitle">DebugTemplate</span>(7ic)</span></a>, <a class="link" href="#DumpStructure" title="DumpStructure"><span class="citerefentry"><span class="refentrytitle">DumpStructure</span>(7ic)</span></a>, <a class="link" href="#SysLog" title="SysLog"><span class="citerefentry"><span class="refentrytitle">SysLog</span>(7ic)</span></a>, <a class="link" href="#LogFile" title="LogFile"><span class="citerefentry"><span class="refentrytitle">LogFile</span>(7ic)</span></a>, <a class="link" href="#DebugHost" title="DebugHost"><span class="citerefentry"><span class="refentrytitle">DebugHost</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DebugHost"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DebugHost — restrict debug mode to requests originating from specific hosts
</p></div><div class="refsect1"><a id="DebugHost_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>IP_address_glob</code></em>... </p></div></div><div class="refsect1"><a id="DebugHost_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">DebugHost</code> configuration directive restricts
<a href="glossary.html#debug" class="olink">debug</a> mode to only selected list of client hosts.
</p><p>
DebugHost accepts a list of IP addresses and IP address ranges.
</p></div><div class="refsect1"><a id="DebugHost_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DebugHost_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_enabling_DebugHost_4660"></a><p class="title"><strong>Example: enabling DebugHost</strong></p><div class="example-contents"><pre class="programlisting">
DebugFile /tmp/debug
DebugHost 10.1.1.0/24 12.176.97.0/25 127.0.0.1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DebugHost_notes"></a><h2>NOTES</h2><p>See <a href="glossary.html#debug" class="olink">debug</a> glossary entry for complete discussion on using debug
mode.
</p></div><div class="refsect1"><a id="DebugHost_availability"></a><h2>AVAILABILITY</h2><p>DebugHost is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DebugHost_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_715_12536"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 715</strong></p><div class="figure-contents"><pre class="screen">
['DebugHost', 'ip_address_regexp', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3880__context_shows_lines_3880_3893__12537"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3880 (context shows lines 3880-3893)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_ip_address_regexp {
my ($var, $value) = @_;
return '' unless $value;
eval {
require Net::IP::Match::Regexp;
};
$@ and config_error("$var directive requires module: $@");
my $re = Net::IP::Match::Regexp::create_iprange_regexp($value)
or config_error("Improper IP address range for $var");
return $re;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DebugHost_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DebugHost_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DebugTemplate" title="DebugTemplate"><span class="citerefentry"><span class="refentrytitle">DebugTemplate</span>(7ic)</span></a>, <a class="link" href="#DebugFile" title="DebugFile"><span class="citerefentry"><span class="refentrytitle">DebugFile</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DebugTemplate"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DebugTemplate — specify format of debug messages
</p></div><div class="refsect1"><a id="DebugTemplate_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> [<em class="replaceable"><code>time_spec</code></em>] | <code class="literal">{CALLER0}</code> ... <code class="literal">{CALLER9}</code> | <code class="literal">{CATALOG}</code> | <code class="literal">{HOST}</code> | <code class="literal">{MESSAGE}</code> | <code class="literal">{PAGE}</code> | <code class="literal">{REMOTE_ADDR}</code> | <code class="literal">{TAG}</code> ... </p></div></div><div class="refsect1"><a id="DebugTemplate_description"></a><h2>DESCRIPTION</h2><p><code class="option">DebugTemplate</code>, a global directive, allows you to change the
format of debug messages.
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<code class="literal">time_spec</code> -
POSIX::strftime() format specifiers. Take
a look at the <a href="glossary.html#time" class="olink">time</a> glossary entry for a complete list. Since the
character <code class="literal">%</code> is treated as the beginning of a specifier,
use <code class="literal">%%</code> to insert a literal <code class="literal">%</code>.
</p></li><li class="listitem"><p>
<code class="literal">{CALLER0}</code> ... <code class="literal">{CALLER9}</code> -
members of the caller() list (see caller() <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> function).
</p></li><li class="listitem"><p>
<code class="literal">{CATALOG}</code> - catalog name
</p></li><li class="listitem"><p>
<code class="literal">{HOST}</code> - remote hostname or IP address
</p></li><li class="listitem"><p>
<code class="literal">{MESSAGE}</code> - actual debug message
</p></li><li class="listitem"><p>
<code class="literal">{PAGE}</code> - current page name (<code class="varname">MV_PAGE</code>)
</p></li><li class="listitem"><p>
<code class="literal">{REMOTE_ADDR}</code> - remote IP address
</p></li><li class="listitem"><p>
<code class="literal">{TAG}</code> - current tag name
(from <code class="classname">Vend::Parse</code>)
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="DebugTemplate_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DebugTemplate_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_DebugTemplate_3006"></a><p class="title"><strong>Example: Setting DebugTemplate</strong></p><div class="example-contents"><pre class="programlisting">
DebugTemplate %c {CALLER0} {MESSAGE} {PAGE} {TAG}
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DebugTemplate_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="DebugTemplate_availability"></a><h2>AVAILABILITY</h2><p>DebugTemplate is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DebugTemplate_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_478_12110"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 478</strong></p><div class="figure-contents"><pre class="screen">
['DebugTemplate', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DebugTemplate_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DebugTemplate_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DebugFile" title="DebugFile"><span class="citerefentry"><span class="refentrytitle">DebugFile</span>(7ic)</span></a>, <a href="vars.html#DEBUG" class="olink"><span class="citerefentry"><span class="refentrytitle">DEBUG</span>(7ic)</span></a>, <a class="link" href="#DebugHost" title="DebugHost"><span class="citerefentry"><span class="refentrytitle">DebugHost</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DefaultLocale"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DefaultLocale — specify default locale
</p></div><div class="refsect1"><a id="DefaultLocale_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>locale_definition</code></em> </p></div></div><div class="refsect1"><a id="DefaultLocale_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the default <a href="glossary.html#locale" class="olink">locale</a>.
</p></div><div class="refsect1"><a id="DefaultLocale_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DefaultLocale_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_DefaultLocale_4196"></a><p class="title"><strong>Example: Defining DefaultLocale</strong></p><div class="example-contents"><pre class="programlisting">
DefaultLocale hr_HR
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Achieving_effect_of_DefaultLocale_using_Locale_directive_4197"></a><p class="title"><strong>Example: Achieving effect of DefaultLocale using Locale directive</strong></p><div class="example-contents"><p>Exactly the same effect as in the above example can be produced with:</p><pre class="programlisting">
Locale hr_HR default 1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DefaultLocale_notes"></a><h2>NOTES</h2><p>If two locales are set "default" using <code class="option">Locale</code>, and no
<code class="option">DefaultLocale</code> is specified, the behavior is undefined as the first
"default" found will be set as the actual default.
</p></div><div class="refsect1"><a id="DefaultLocale_availability"></a><h2>AVAILABILITY</h2><p>DefaultLocale is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DefaultLocale_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_610_12418"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 610</strong></p><div class="figure-contents"><pre class="screen">
['DefaultLocale', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DefaultLocale_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="DefaultLocale_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Locale" title="Locale"><span class="citerefentry"><span class="refentrytitle">Locale</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DefaultShipping"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DefaultShipping — specify default shipping method
</p></div><div class="refsect1"><a id="DefaultShipping_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>ship_mode</code></em> </p></div></div><div class="refsect1"><a id="DefaultShipping_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the default <a href="glossary.html#shipping" class="olink">shipping</a> method by
initializing the <code class="mv">mv_shipmode</code> variable.
</p><p>
It defaults to a value "<code class="literal">default</code>".
</p></div><div class="refsect1"><a id="DefaultShipping_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DefaultShipping_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_DefaultShipping_3919"></a><p class="title"><strong>Example: Specifying DefaultShipping</strong></p><div class="example-contents"><pre class="programlisting">
DefaultShipping UPS
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DefaultShipping_notes"></a><h2>NOTES</h2><p>This directive is somewhat obsolete, because the behavior from the example
is simply obtained by a different approach in <code class="filename">catalog.cfg</code>:
</p><pre class="programlisting">
ValuesDefault mv_shipmode UPS
</pre><p>
</p></div><div class="refsect1"><a id="DefaultShipping_availability"></a><h2>AVAILABILITY</h2><p>DefaultShipping is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DefaultShipping_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_691_12356"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 691</strong></p><div class="figure-contents"><pre class="screen">
['DefaultShipping', undef, 'default'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DefaultShipping_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DefaultShipping_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Shipping" title="Shipping"><span class="citerefentry"><span class="refentrytitle">Shipping</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DeleteDirective"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DeleteDirective — disable use of specified configuration directive in catalog.cfg
</p></div><div class="refsect1"><a id="DeleteDirective_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directive</code></em>... </p></div></div><div class="refsect1"><a id="DeleteDirective_description"></a><h2>DESCRIPTION</h2><p>This directive specifies the directives which are to be disabled during parse
of the <code class="filename">catalog.cfg</code> files.
</p><p>
This can be effectively used to both save some memory on servers with many
catalogs and prevent catalogs from setting some of the directives.
</p></div><div class="refsect1"><a id="DeleteDirective_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DeleteDirective_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_DeleteDirective_2927"></a><p class="title"><strong>Example: Setting DeleteDirective</strong></p><div class="example-contents"><pre class="programlisting">
DeleteDirective DescriptionField OfflineDir
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DeleteDirective_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="DeleteDirective_availability"></a><h2>AVAILABILITY</h2><p>DeleteDirective is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DeleteDirective_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_408__context_shows_lines_398_404__12092"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 408 (context shows lines 398-404)</strong></p><div class="figure-contents"><pre class="screen">
['DeleteDirective', sub {
my $c = $Global::DeleteDirective || {};
shift;
my @sets = map { lc $_ } split /[,\s]+/, shift;
@{$c}{@sets} = map { 1 } @sets;
return $c;
}, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DeleteDirective_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DeleteDirective_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AddDirective" title="AddDirective"><span class="citerefentry"><span class="refentrytitle">AddDirective</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DeliverImage"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DeliverImage — allow delivery of images through Interchange
</p></div><div class="refsect1"><a id="DeliverImage_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="DeliverImage_description"></a><h2>DESCRIPTION</h2><p>The directive specifies whether images can be fetched directly over
the <a href="glossary.html#link-program" class="olink">link program</a>.
</p><p>
If the requested file is present and the MimeType for the file's
extension begins with <code class="literal">image/</code>, the path will be adjusted
to add <code class="option">ImageDir</code> or <code class="option">ImageDirSecure</code>, and a
<a class="ulink" href="http://www.checkupdown.com/status/E302.html" target="_top">status 302</a>
("Moved temporarily") issued. At that point, the image should
be visible on users' screens.
</p><p>
This whole thing happens before database or session opens, and is quite fast.
<code class="varname">$Vend::tmp_session</code> is set so no cookie is issued.
</p></div><div class="refsect1"><a id="DeliverImage_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DeliverImage_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_DeliverImage_3850"></a><p class="title"><strong>Example: Enabling DeliverImage</strong></p><div class="example-contents"><p>Put the following in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
DeliverImage Yes
</pre><p>
Now to request an image, instead of the usual page (such as
<code class="literal">index.html</code>), ask <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> for say,
<code class="literal">interchange.png</code> (given that the file is present in
<code class="option">ImageDir</code> or <code class="option">ImageDirSecure</code>, of course).
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="DeliverImage_notes"></a><h2>NOTES</h2><p>This feature was introduced to help cope with the unpleasant behavior
of the Mozilla HTML editor.
</p></div><div class="refsect1"><a id="DeliverImage_availability"></a><h2>AVAILABILITY</h2><p>DeliverImage is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DeliverImage_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_627_12339"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 627</strong></p><div class="figure-contents"><pre class="screen">
['DeliverImage', 'yesno', 'no'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12340"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DeliverImage_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="DeliverImage_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DescriptionField"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DescriptionField — specify name of the "description" field in the Interchange database
</p></div><div class="refsect1"><a id="DescriptionField_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>field_name</code></em> </p></div></div><div class="refsect1"><a id="DescriptionField_description"></a><h2>DESCRIPTION</h2><p>By default, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> expects the product description to be in the
<span class="database">description</span> field in the
<span class="database">products</span> database.
This directive allows modification of the default name.
</p><p>
The field is accessed implicitly when you call say,
<code class="code">[item-description]</code> in <a href="glossary.html#ITL" class="olink">ITL</a>.
</p></div><div class="refsect1"><a id="DescriptionField_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DescriptionField_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Redefining_DescriptionField_3812"></a><p class="title"><strong>Example: Redefining DescriptionField</strong></p><div class="example-contents"><pre class="programlisting">
DescriptionField dsc
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_DecriptionField_depending_on_current_locale_3813"></a><p class="title"><strong>Example: Setting DecriptionField depending on current locale</strong></p><div class="example-contents"><pre class="programlisting">
# Establish the default at startup
DecriptionField description
# Establish locale-specific description field
Locale fr_FR DecriptionField desc_fr
</pre><p>
To fully understand the example and implicitly presented <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> features, make
sure you're familiar with <a href="glossary.html#internationalization" class="olink">internationalization</a> and <a href="glossary.html#locale" class="olink">locale</a>
glossary
entries.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="DescriptionField_notes"></a><h2>NOTES</h2><p>It's useful to set this directive based on <a href="glossary.html#locale" class="olink">locale</a>,
allowing for locale-specific product descriptions.
</p></div><div class="refsect1"><a id="DescriptionField_availability"></a><h2>AVAILABILITY</h2><p>DescriptionField is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DescriptionField_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_697_12332"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 697</strong></p><div class="figure-contents"><pre class="screen">
['DescriptionField', undef, 'description'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DescriptionField_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DescriptionField_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#description" class="olink"><span class="citerefentry"><span class="refentrytitle">description</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DirConfig"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DirConfig — batch-set a bunch of variables (or values in general) from files
</p></div><div class="refsect1"><a id="DirConfig_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directive_name</code></em> <em class="replaceable"><code>directory_glob</code></em> </p></div></div><div class="refsect1"><a id="DirConfig_description"></a><h2>DESCRIPTION</h2><p>The directive allows you to batch-set a bunch of variables from files.
</p><p>
<code class="literal"><em class="replaceable"><code>directive_name</code></em></code> is usually
<code class="literal">Variable</code>, but can practically be any hash-based directive.
<code class="literal"><em class="replaceable"><code>directory_glob</code></em></code> is a filespec
that can encompass multiple directories (files are ignored).
</p><p>
The specified directories are read for file <span class="emphasis"><em>names</em></span> that
contain only word characters, i.e. something that would be a valid
<code class="option">Variable</code>. (This alone might make
it unsuitable for some other uses, but picking up the junk from the
in-directory-backup-file people would be intolerable.)
Then the contents of the found files are used to set the variables (or other
values) named after file names.
</p><p>
The source file name is kept in
<code class="varname">$Vend::Cfg->{DirConfig}{Variable}{<em class="replaceable"><code>VARNAME</code></em>}</code>
if <span style="color: red"><pragma>dynamic_variables</pragma></span> <a href="glossary.html#pragma" class="olink">pragma</a> is set.
<span style="color: red"><pragma>dynamic_variables</pragma></span> enables <span class="emphasis"><em>dynamic</em></span>
updating of variables from files.
<span style="color: red"><pragma>dynamic_variables_files_only</pragma></span> restricts dynamic variables to
files only — otherwise variables are dynamically read from the
<code class="option">VariableDatabase</code> definition as well.
</p><p>
With dynamic variables, all
<code class="code">@_<em class="replaceable"><code>VARIABLE</code></em>_@</code> and
<code class="code">__<em class="replaceable"><code>VARIABLE</code></em>__</code> calls are checked
first to see if their source file is defined. If they are — if there is
a hash key present for the source file — even if its contents are blank,
it is returned as the value.
</p></div><div class="refsect1"><a id="DirConfig_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DirConfig_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_DirConfig_4377"></a><p class="title"><strong>Example: Setting DirConfig</strong></p><div class="example-contents"><pre class="programlisting">
DirConfig Variable templates/foundation/regions
</pre><p>
If the file <code class="filename">NOLEFT_TOP</code> is present at catalog config time
at the specified location, code <code class="code">__NOLEFT_TOP__</code> encountered on
a page will mimic
<code class="code">[include templates/foundation/regions/NOLEFT_TOP]</code>.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="DirConfig_notes"></a><h2>NOTES</h2><p>Make sure you don't get confused by the existence of all
<code class="option">DirConfig</code>, <code class="option">ConfDir</code> and <code class="option">ConfigDir</code>.
</p></div><div class="refsect1"><a id="DirConfig_availability"></a><h2>AVAILABILITY</h2><p>DirConfig is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DirConfig_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_614_12465"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 614</strong></p><div class="figure-contents"><pre class="screen">
['DirConfig', 'dirconfig', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4707__context_shows_lines_4707_4739__12466"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4707 (context shows lines 4707-4739)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_dirconfig {
my ($var, $value) = @_;
return '' if ! $value;
$value =~ s/(\w+)\s+//;
my $direc = $1;
#::logDebug("direc=$direc value=$value");
my $ref = $C->{$direc};
unless(ref($ref) eq 'HASH') {
config_error("DirConfig called for non-hash configuration directive.");
}
my $source = $C->{$var} || {};
my $sref = $source->{$direc} || {};
my @dirs = grep -d $_, glob($value);
foreach my $dir (@dirs) {
opendir(DIRCONFIG, $dir)
or next;
my @files = grep /^\w+$/, readdir(DIRCONFIG);
for(@files) {
next unless -f "$dir/$_";
#::logDebug("reading key=$_ from $dir/$_");
$ref->{$_} = readfile("$dir/$_", $Global::NoAbsolute, 0);
$ref->{$_} = substitute_variable($ref->{$_}) if $C->{ParseVariables};
$sref->{$_} = "$dir/$_";
}
}
$source->{$direc} = $sref;
return $source;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DirConfig_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DirConfig_seeAlso"></a><h2>SEE ALSO</h2><p><a href="pragmas.html#dynamic_variables" class="olink"><span class="citerefentry"><span class="refentrytitle">dynamic_variables</span>(7ic)</span></a>, <a href="pragmas.html#dynamic_variables_file_only" class="olink"><span class="citerefentry"><span class="refentrytitle">dynamic_variables_file_only</span>(7ic)</span></a>, <a class="link" href="#VariableDatabase" title="VariableDatabase"><span class="citerefentry"><span class="refentrytitle">VariableDatabase</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DirectiveDatabase"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DirectiveDatabase — specify database to read configuration directives from
</p></div><div class="refsect1"><a id="DirectiveDatabase_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>table_name</code></em>
[<em class="replaceable"><code>table_source_filename</code></em>
[<em class="replaceable"><code>table_source_type</code></em>]] </p></div></div><div class="refsect1"><a id="DirectiveDatabase_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">DirectiveDatabase</code> configuration directive makes it possible to
read all configuration directives from a <a href="glossary.html#database" class="olink">database</a>, instead of
from the usual <code class="filename">catalog.cfg</code> configuration file.
</p><p>
The database can (but does not have to) be previously defined with
the <code class="option">Database</code> directive. When it is, then just the table name
is required and honored. When it is not, then the <code class="option">Database</code> directive
will be automatically invoked first to register the new table, possibly with
custom text source file and table type.
</p><p>
<code class="literal">table_source_filename</code> defaults to
<code class="literal"><em class="replaceable"><code>table_name</code></em>.txt</code>, and
<code class="literal">table_source_type</code> defaults to <code class="literal">TAB</code>.
(The arguments are the same as for the <code class="option">Database</code> directive itself,
they are passed to it directly.)
</p></div><div class="refsect1"><a id="DirectiveDatabase_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DirectiveDatabase_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_DirectiveDatabase__single_step_4023"></a><p class="title"><strong>Example: Defining DirectiveDatabase, single-step</strong></p><div class="example-contents"><pre class="programlisting">
DirectiveDatabase catalog catalog.txt TAB
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Defining_DirectiveDatabase__two_step_4024"></a><p class="title"><strong>Example: Defining DirectiveDatabase, two-step</strong></p><div class="example-contents"><pre class="programlisting">
Database catalog catalog.txt TAB
DirectiveDatabase catalog
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DirectiveDatabase_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="DirectiveDatabase_availability"></a><h2>AVAILABILITY</h2><p>DirectiveDatabase is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DirectiveDatabase_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_612_12377"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 612</strong></p><div class="figure-contents"><pre class="screen">
['DirectiveDatabase', 'dbconfig', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4741__context_shows_lines_4741_4787__12378"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4741 (context shows lines 4741-4787)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_dbconfig {
my ($var, $value) = @_;
my ($file, $type);
return '' if ! $value;
local($Vend::Cfg) = $C;
my ($db, $table);
eval {
($db, $table) = get_configdb($var, $value);
};
return '' if ! $db;
my ($k, @f); # key and fields
my @l; # refs to locale repository
my @n; # names of locales
my @h; # names of locales
@n = $db->columns();
shift @n;
my $extra;
for(@n) {
my $real = $CDname{lc $_};
if (! ref $Vend::Cfg->{$real} or $Vend::Cfg->{$real} !~ /HASH/) {
# ignore non-existent directive, but put in hash
my $ref = {};
push @l, $ref;
push @h, [$real, $ref];
next;
}
push @l, $Vend::Cfg->{$real};
}
my $i;
while( ($k, undef, @f ) = $db->each_record) {
#::logDebug("Got key=$k f=@f");
for ($i = 0; $i < @f; $i++) {
next unless length($f[$i]);
$l[$i]->{$k} = $f[$i];
}
}
for(@h) {
$Vend::Cfg->{Hash}{$_->[0]} = $_->[1];
}
$db->close_table();
return $table;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DirectiveDatabase_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DirectiveDatabase_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Database" title="Database"><span class="citerefentry"><span class="refentrytitle">Database</span>(7ic)</span></a>, <a class="link" href="#FileDatabase" title="FileDatabase"><span class="citerefentry"><span class="refentrytitle">FileDatabase</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DirectoryIndex"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DirectoryIndex — specify the default page in a directory
</p></div><div class="refsect1"><a id="DirectoryIndex_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="DirectoryIndex_description"></a><h2>DESCRIPTION</h2><p>Specify the default page to show in a directory.
</p><p>
When the location requested does not exist, and this directive is set,
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> will try to append the specified filename to the URL, and re-test
for the page existence.
</p><p>
This directive sets the default page for all directories
<span class="bold"><strong>except</strong></span> the catalog entry point.
(In other words, this directive won't help you make
<code class="literal">http://myhost.mydomain.local/</code> show
<code class="literal">http://myhost.mydomain.local/index.html</code> -
see the <code class="option">SpecialPage</code> for that).
</p></div><div class="refsect1"><a id="DirectoryIndex_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DirectoryIndex_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_DirectoryIndex_4097"></a><p class="title"><strong>Example: Setting DirectoryIndex</strong></p><div class="example-contents"><pre class="programlisting">
DirectoryIndex index.html
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DirectoryIndex_notes"></a><h2>NOTES</h2><p>Although the name for this directive was borrowed from the <a class="ulink" href="http://www.apache.org/" target="_top">Apache</a> Web
Server project, it only accepts one filename (unlike Apache which supports
multiple filenames to look for in sequential order).
</p></div><div class="refsect1"><a id="DirectoryIndex_availability"></a><h2>AVAILABILITY</h2><p>DirectoryIndex is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DirectoryIndex_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_569_12394"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 569</strong></p><div class="figure-contents"><pre class="screen">
['DirectoryIndex', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DirectoryIndex_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DirectoryIndex_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#SpecialPage" title="SpecialPage"><span class="citerefentry"><span class="refentrytitle">SpecialPage</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DiscountSpaceVar"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DiscountSpaceVar — specify names of CGI variables to check for discount space definition
</p></div><div class="refsect1"><a id="DiscountSpaceVar_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>cgi_variable_name</code></em>... </p></div></div><div class="refsect1"><a id="DiscountSpaceVar_description"></a><h2>DESCRIPTION</h2><p><code class="option">DiscountSpaceVar</code> is a configuration directive with the
default value of '<code class="literal">mv_discount_space</code>'. It is a list of
names of <a href="glossary.html#CGI" class="olink">CGI</a> variables to check per page process, such that a <a href="glossary.html#CGI" class="olink">CGI</a>
variable can be used to specify the discount space.
</p><p>
For this directive to have any effect, the <code class="option">DiscountSpacesOn</code> directive
must be enabled.
</p><p>
The default value, <code class="mv">mv_discount_space</code>,
is likely to suffice for most purposes, but people could want to tie the
discount space
to other things, such as the <a href="glossary.html#cart" class="olink">cart</a> name, by including other variable
names in
this array (for instance, <code class="literal">mv_cartname</code> would tie the
discount space to the cart name, which could be convenient in some situations).
</p></div><div class="refsect1"><a id="DiscountSpaceVar_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DiscountSpaceVar_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_DiscountSpaceVar_3788"></a><p class="title"><strong>Example: Defining DiscountSpaceVar</strong></p><div class="example-contents"><pre class="programlisting">
DiscountSpacesOn Yes
DiscountSpaceVar mv_cartname
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DiscountSpaceVar_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="DiscountSpaceVar_availability"></a><h2>AVAILABILITY</h2><p>DiscountSpaceVar is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DiscountSpaceVar_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_701_12326"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 701</strong></p><div class="figure-contents"><pre class="screen">
['DiscountSpaceVar', 'array', 'mv_discount_space'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3755__context_shows_lines_3755_3775__12327"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3755 (context shows lines 3755-3775)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_array {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || [];
}
else {
no strict 'refs';
$c = ${"Global::$item"} || [];
}
for (@setting) {
check_legal($item, $_);
push @{$c}, $_;
}
$c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DiscountSpaceVar_authors"></a><h2>AUTHORS</h2><p>Ethan Rowe
</p></div><div class="refsect1"><a id="DiscountSpaceVar_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DiscountSpacesOn" title="DiscountSpacesOn"><span class="citerefentry"><span class="refentrytitle">DiscountSpacesOn</span>(7ic)</span></a>, <a href="tags.html#discount" class="olink"><span class="citerefentry"><span class="refentrytitle">discount</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DiscountSpacesOn"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DiscountSpacesOn — enable "discount spaces" feature
</p></div><div class="refsect1"><a id="DiscountSpacesOn_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="DiscountSpacesOn_description"></a><h2>DESCRIPTION</h2><p>This directive enables the "discount spaces" feature.
</p><p>
When <code class="option">DiscountSpacesOn</code> is enabled, then on a per-page
before-<a href="glossary.html#autoload" class="olink">autoload</a> basis, this routine initializes the
current discount space to '<code class="literal">main</code>', and then checks
all <a href="glossary.html#CGI" class="olink">CGI</a> variables defined with the <code class="option">DiscountSpaceVar</code>
configuration directive to see if an alternate discount space has
been specified.
</p><p>
When <code class="option">DiscountSpacesOn</code> is not enabled, then the behavior is
compatible to how it was before the feature was added to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> —
all "discount space" functions become a no-operation; any attempts
to specify an alternate discount space will have no effect, and will
result in an error message in the <a href="glossary.html#catalog" class="olink">catalog</a>'s error log.
</p><p>
See glossary entry <a href="glossary.html#discount" class="olink">discount</a> for a complete discussion.
</p></div><div class="refsect1"><a id="DiscountSpacesOn_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="DiscountSpacesOn_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_DiscountSpacesOn_4117"></a><p class="title"><strong>Example: Enabling DiscountSpacesOn</strong></p><div class="example-contents"><pre class="programlisting">
DiscountSpacesOn Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DiscountSpacesOn_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="DiscountSpacesOn_availability"></a><h2>AVAILABILITY</h2><p>DiscountSpacesOn is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DiscountSpacesOn_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_700_12399"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 700</strong></p><div class="figure-contents"><pre class="screen">
['DiscountSpacesOn', 'yesno', 'no'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12400"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DiscountSpacesOn_authors"></a><h2>AUTHORS</h2><p>Ethan Rowe
</p></div><div class="refsect1"><a id="DiscountSpacesOn_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#discount" class="olink"><span class="citerefentry"><span class="refentrytitle">discount</span>(7ic)</span></a>, <a class="link" href="#DiscountSpaceVar" title="DiscountSpaceVar"><span class="citerefentry"><span class="refentrytitle">DiscountSpaceVar</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DisplayErrors"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DisplayErrors — display eventual errors directly in the client session
</p></div><div class="refsect1"><a id="DisplayErrors_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="DisplayErrors_description"></a><h2>DESCRIPTION</h2><p>All <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> errors are reported in the error log, but errors can also be
displayed directly in the client browser. This is convenient while testing
a configuration. To allow catalog-specific settings of <code class="option">DisplayErrors</code>
the global directive needs to be enabled.
</p></div><div class="refsect1"><a id="DisplayErrors_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="DisplayErrors_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_DisplayErrors_3173"></a><p class="title"><strong>Example: Enabling DisplayErrors</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
DisplayErrors Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DisplayErrors_notes"></a><h2>NOTES</h2><p>This directive changes the operation of <code class="code">$SIG{__DIE__}</code> and
may have other effects on program operation.
This should <span class="bold"><strong>never</strong></span> be used for normal
operation.
</p></div><div class="refsect1"><a id="DisplayErrors_availability"></a><h2>AVAILABILITY</h2><p>DisplayErrors is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DisplayErrors_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_407_12152"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 407</strong></p><div class="figure-contents"><pre class="screen">
['DisplayErrors', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_566_12153"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 566</strong></p><div class="figure-contents"><pre class="screen">
['DisplayErrors', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12154"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DisplayErrors_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DisplayErrors_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DomainTail"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DomainTail — honor only the toplevel domain in IP qualification
</p></div><div class="refsect1"><a id="DomainTail_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> Yes | No </p></div></div><div class="refsect1"><a id="DomainTail_description"></a><h2>DESCRIPTION</h2><p>The directive simply specifies that only the toplevel domain
should be used in IP qualification for <a href="glossary.html#session" class="olink">session</a> IDs.
If, for example, an IP was <code class="literal">ri01-053.dialin.iskon.hr</code>,
only <code class="literal">iskon.hr</code> would be used.
</p><p>
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> also supports taking various <a class="ulink" href="http://en.wikipedia.org/wiki/Country_code_top-level_domain" target="_top">ccTLD</a>s into account;
see <code class="option">CountrySubdomains</code>.
</p><p>
</p></div><div class="refsect1"><a id="DomainTail_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DomainTail_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Disabling_DomainTail_3260"></a><p class="title"><strong>Example: Disabling DomainTail</strong></p><div class="example-contents"><pre class="programlisting">
DomainTail No
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DomainTail_notes"></a><h2>NOTES</h2><p>This directive is a compromise on security, but it allows browsers that
do not accept cookies to use multiple proxy servers in the same domain.
Note that this directive is <span class="bold"><strong>enabled</strong></span>
by default.
</p><p>
If you are encrypting credit cards with PGP/GPG or using payment services,
then look at the <code class="option">WideOpen</code> directive, which
enables even more browser compatibility, again at the cost of some
security.
</p></div><div class="refsect1"><a id="DomainTail_availability"></a><h2>AVAILABILITY</h2><p>DomainTail is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DomainTail_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_479_12178"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 479</strong></p><div class="figure-contents"><pre class="screen">
['DomainTail', 'yesno', 'Yes'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12179"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DomainTail_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DomainTail_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#WideOpen" title="WideOpen"><span class="citerefentry"><span class="refentrytitle">WideOpen</span>(7ic)</span></a>, <a class="link" href="#IpHead" title="IpHead"><span class="citerefentry"><span class="refentrytitle">IpHead</span>(7ic)</span></a>, <a class="link" href="#CountrySubdomains" title="CountrySubdomains"><span class="citerefentry"><span class="refentrytitle">CountrySubdomains</span>(7ic)</span></a>, <a class="link" href="#IpQuad" title="IpQuad"><span class="citerefentry"><span class="refentrytitle">IpQuad</span>(7ic)</span></a>, <a class="link" href="#LockoutCommand" title="LockoutCommand"><span class="citerefentry"><span class="refentrytitle">LockoutCommand</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DowncaseVarname"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DowncaseVarname</p></div><div class="refsect1"><a id="DowncaseVarname_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="DowncaseVarname_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="DowncaseVarname_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DowncaseVarname_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="DowncaseVarname_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="DowncaseVarname_availability"></a><h2>AVAILABILITY</h2><p>DowncaseVarname is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DowncaseVarname_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_520_12036"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 520</strong></p><div class="figure-contents"><pre class="screen">
['DowncaseVarname', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DowncaseVarname_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DowncaseVarname_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DumpAllCfg"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DumpAllCfg — dump global Interchange server configuration
</p></div><div class="refsect1"><a id="DumpAllCfg_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="DumpAllCfg_description"></a><h2>DESCRIPTION</h2><p>Instruct <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to dump the complete server configuration (with "includes"
expanded) to <code class="filename">allconfigs.cfg</code> in the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> run
directory.
</p><p>
The dump file does not contain catalog configurations.
</p></div><div class="refsect1"><a id="DumpAllCfg_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DumpAllCfg_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_DumpAllCfg_2941"></a><p class="title"><strong>Example: Enabling DumpAllCfg</strong></p><div class="example-contents"><pre class="programlisting">
DumpAllCfg 1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DumpAllCfg_notes"></a><h2>NOTES</h2><p><a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> "run directory" is <code class="filename">/usr/local/interchange/etc/</code> on
tarball installs, and <code class="filename">/var/run/interchange</code> on
LSB setups.
</p><p>
<code class="option">DumpAllCfg</code> was previously known as "<code class="literal">OutputAllCfg</code>", but
was renamed to ideologically match <code class="option">DumpStructure</code>.
</p></div><div class="refsect1"><a id="DumpAllCfg_availability"></a><h2>AVAILABILITY</h2><p>DumpAllCfg is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DumpAllCfg_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_406_12095"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 406</strong></p><div class="figure-contents"><pre class="screen">
['DumpAllCfg', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12096"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DumpAllCfg_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DumpAllCfg_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DumpStructure" title="DumpStructure"><span class="citerefentry"><span class="refentrytitle">DumpStructure</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="DumpStructure"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>DumpStructure — dump Interchange server and catalog structure for each catalog
</p></div><div class="refsect1"><a id="DumpStructure_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="DumpStructure_description"></a><h2>DESCRIPTION</h2><p>Instruct Interchange to dump the structure of catalogs and the Interchange server to files named <code class="filename"><em class="replaceable"><code>catalog_name</code></em>.structure</code>. Use this to see how directives have been set.
</p><p>
The catalog structure files are dumped relative to catalog roots
(<a href="glossary.html#CATROOT" class="olink">CATROOT</a>s).
</p></div><div class="refsect1"><a id="DumpStructure_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="DumpStructure_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_DumpStructure_3211"></a><p class="title"><strong>Example: Enabling DumpStructure</strong></p><div class="example-contents"><pre class="programlisting">
DumpStructure Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="DumpStructure_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="DumpStructure_availability"></a><h2>AVAILABILITY</h2><p>DumpStructure is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="DumpStructure_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_405_12165"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 405</strong></p><div class="figure-contents"><pre class="screen">
['DumpStructure', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12166"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="DumpStructure_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="DumpStructure_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DebugFile" title="DebugFile"><span class="citerefentry"><span class="refentrytitle">DebugFile</span>(7ic)</span></a>, <a href="vars.html#DEBUG" class="olink"><span class="citerefentry"><span class="refentrytitle">DEBUG</span>(7ic)</span></a>, <a class="link" href="#DumpAllCfg" title="DumpAllCfg"><span class="citerefentry"><span class="refentrytitle">DumpAllCfg</span>(7ic)</span></a>, <a class="link" href="#DataTrace" title="DataTrace"><span class="citerefentry"><span class="refentrytitle">DataTrace</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="EncryptKey"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>EncryptKey — specify default key to use for encryption
</p></div><div class="refsect1"><a id="EncryptKey_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>key_or_user_identifier</code></em> </p></div></div><div class="refsect1"><a id="EncryptKey_description"></a><h2>DESCRIPTION</h2><p>Specify default key to use for encryption.
</p><p>
GnuPG accepts both a key identifier or a part of user identifier.
</p></div><div class="refsect1"><a id="EncryptKey_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="EncryptKey_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_key_identifier_to_EncryptKey_3842"></a><p class="title"><strong>Example: Specifying key identifier to EncryptKey</strong></p><div class="example-contents"><pre class="programlisting">
EncryptKey 9B726B71
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Specifying_user_identifier_to_EncryptKey_3843"></a><p class="title"><strong>Example: Specifying user identifier to EncryptKey</strong></p><div class="example-contents"><pre class="programlisting">
EncryptKey racke@linuxia.de
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="EncryptKey_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="EncryptKey_availability"></a><h2>AVAILABILITY</h2><p>EncryptKey is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="EncryptKey_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_671_12338"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 671</strong></p><div class="figure-contents"><pre class="screen">
['EncryptKey', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="EncryptKey_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="EncryptKey_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#EncryptProgram" title="EncryptProgram"><span class="citerefentry"><span class="refentrytitle">EncryptProgram</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="EncryptProgram"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>EncryptProgram — specify default encryption program
</p></div><div class="refsect1"><a id="EncryptProgram_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> [<em class="replaceable"><code>arguments</code></em>]</p></div></div><div class="refsect1"><a id="EncryptProgram_description"></a><h2>DESCRIPTION</h2><p>Specify default encryption program, and a template to call it. The encryption
program will be called to perform tasks such as encrypting credit card
numbers (<span class="bold"><strong>if</strong></span> they are stored on the server).
</p><p>
Two placeholders can be used, <code class="literal">%p</code> and
<code class="literal">%f</code>. At encryption time,
<code class="literal">%p</code>
expands to a password, and
<code class="literal">%f</code>
to a temporary file name.
</p><p>
If <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> can found a variant of <span class="command"><strong>gpg</strong></span>/<span class="command"><strong>pgp</strong></span>
on your system, it is the default. Setting of <code class="literal">none</code> disables
encryption.
</p><p>
Specifying command line options for the encryption program isn't required,
as <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> automatically adds the following options, depending on the program
recognized:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<code class="literal">gpg --batch --always-trust -e -a -r <em class="replaceable"><code>KEY</code></em></code>
</p></li><li class="listitem"><p>
<code class="literal">pgpe -fat -r <em class="replaceable"><code>KEY</code></em></code>
</p></li><li class="listitem"><p>
<code class="literal">pgp -fat - <em class="replaceable"><code>KEY</code></em></code>
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="EncryptProgram_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="EncryptProgram_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_EncryptProgram_2819"></a><p class="title"><strong>Example: Specifying EncryptProgram</strong></p><div class="example-contents"><pre class="programlisting">
EncryptProgram gpg
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Specifying_EncryptProgram_with_full_path_and_arguments_2820"></a><p class="title"><strong>Example: Specifying EncryptProgram with full path and arguments</strong></p><div class="example-contents"><pre class="programlisting">
EncryptProgram /usr/local/bin/gpg --batch --always-trust -e -a -r orders@mydomain.local
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Specifying_EncryptProgram_with_full_path_and_arguments_2821"></a><p class="title"><strong>Example: Specifying EncryptProgram with full path and arguments</strong></p><div class="example-contents"><pre class="programlisting">
EncryptProgram /usr/bin/pgpe -fat -r orders@mydomain.local
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="EncryptProgram_notes"></a><h2>NOTES</h2><p>This directive is different from <code class="option">PGP</code>, which is used to encrypt
<span class="emphasis"><em>complete</em></span> orders and not just part of their contents.
</p><p>
If the order <code class="option">Route</code> method of sending orders is used (default in the
standard demo), then this directive sets the default value of
the <code class="literal">encrypt_program</code> attribute.
</p><p>
Since <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> 4.7.7, specifying program filename only is enough —
no arguments are needed, although they will still work as expected.
</p><p>
If the encrypt program is in your path, avoid using full pathname to
ease the eventual switch to a platform with different binary file locations.
</p></div><div class="refsect1"><a id="EncryptProgram_availability"></a><h2>AVAILABILITY</h2><p>EncryptProgram is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="EncryptProgram_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_440_12065"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 440</strong></p><div class="figure-contents"><pre class="screen">
['EncryptProgram', 'executable', [ 'gpg', 'pgpe', 'none', ] ],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4030__context_shows_lines_4030_4086__12066"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4030 (context shows lines 4030-4086)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_executable {
my($var, $initial) = @_;
my($x);
my(@tries);
if(ref $initial) {
@tries = @$initial;
}
else {
@tries = $initial;
}
TRYEXE:
foreach my $value (@tries) {
#::logDebug("trying $value for $var");
my $root = $value;
$root =~ s/\s.*//;
return $value if $Global::Windows;
if( ! defined $value or $value eq '') {
$x = '';
}
elsif( $value eq 'none') {
$x = 'none';
last;
}
elsif( $value =~ /^\w+::[:\w]+\w$/) {
## Perl module like Net::SMTP
eval {
eval "require $value";
die if $@;
$x = $value;
};
last if $x;
}
elsif ($root =~ m#^/# and -x $root) {
$x = $value;
last;
}
else {
my @path = split /:/, $ENV{PATH};
for (@path) {
next unless -x "$_/$root";
$x = $value;
last TRYEXE;
}
}
}
config_error( errmsg(
"Can't find executable (%s) for the %s directive\n",
join('|', @tries),
$var,
)
) unless defined $x;
#::logDebug("$var=$x");
return $x;
}
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_670_12067"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 670</strong></p><div class="figure-contents"><pre class="screen">
['EncryptProgram', undef, $Global::EncryptProgram || ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="EncryptProgram_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="EncryptProgram_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DebugFile" title="DebugFile"><span class="citerefentry"><span class="refentrytitle">DebugFile</span>(7ic)</span></a>, <a href="vars.html#GPG_PATH" class="olink"><span class="citerefentry"><span class="refentrytitle">GPG_PATH</span>(7ic)</span></a>, <a href="vars.html#DEBUG" class="olink"><span class="citerefentry"><span class="refentrytitle">DEBUG</span>(7ic)</span></a>, <a href="filters.html#encrypt" class="olink"><span class="citerefentry"><span class="refentrytitle">encrypt</span>(7ic)</span></a>, <a class="link" href="#DataTrace" title="DataTrace"><span class="citerefentry"><span class="refentrytitle">DataTrace</span>(7ic)</span></a>, <a class="link" href="#PGP" title="PGP"><span class="citerefentry"><span class="refentrytitle">PGP</span>(7ic)</span></a>, <a class="link" href="#EncryptKey" title="EncryptKey"><span class="citerefentry"><span class="refentrytitle">EncryptKey</span>(7ic)</span></a>, <a class="link" href="#CreditCardAuto" title="CreditCardAuto"><span class="citerefentry"><span class="refentrytitle">CreditCardAuto</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Environment"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Environment — specify environment variables to inherit from the calling CGI link program
</p></div><div class="refsect1"><a id="Environment_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> environment_variable_name... </p></div></div><div class="refsect1"><a id="Environment_description"></a><h2>DESCRIPTION</h2><p>Specify environment variables to inherit from the calling CGI link program.
</p></div><div class="refsect1"><a id="Environment_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="Environment_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_Environment_directive_3037"></a><p class="title"><strong>Example: Setting Environment directive</strong></p><div class="example-contents"><pre class="programlisting">
Environment MOD_PERL REMOTE_USER PGPPATH
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Environment_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Environment_availability"></a><h2>AVAILABILITY</h2><p>Environment is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Environment_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_430_12116"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 430</strong></p><div class="figure-contents"><pre class="screen">
['Environment', 'array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3755__context_shows_lines_3755_3775__12117"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3755 (context shows lines 3755-3775)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_array {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || [];
}
else {
no strict 'refs';
$c = ${"Global::$item"} || [];
}
for (@setting) {
check_legal($item, $_);
push @{$c}, $_;
}
$c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Environment_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Environment_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RemoteUser" title="RemoteUser"><span class="citerefentry"><span class="refentrytitle">RemoteUser</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ErrorDestination"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ErrorDestination — route error messages to different files, based on message content or arbitrary tag
</p></div><div class="refsect1"><a id="ErrorDestination_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>tag_or_message</code></em> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="ErrorDestination_description"></a><h2>DESCRIPTION</h2><p>The directive allows routing error messages to different files, based on
either message content or an arbitrary tag.
</p><p>
This allows us to add message "routing" information at a single place
in the catalog configuration, instead of having to provide
file attribute to each invocation of
error-related tags of functions.
</p></div><div class="refsect1"><a id="ErrorDestination_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ErrorDestination_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Routing_error_messages_based_on_error_message_4312"></a><p class="title"><strong>Example: Routing error messages based on error message</strong></p><div class="example-contents"><pre class="programlisting">
ErrorDestination "Attempt to order missing product code: %s" logs/missing_products.log
ErrorDestination "search error: %s" logs/search_errors.log
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Routing_error_messages_based_on_an_arbitrary_tag_4313"></a><p class="title"><strong>Example: Routing error messages based on an arbitrary tag</strong></p><div class="example-contents"><pre class="programlisting">
ErrorDestination missing_code logs/missing_product.log
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Logging_in_Perl_and_specifying_a_custom_tag_4314"></a><p class="title"><strong>Example: Logging in Perl and specifying a custom tag</strong></p><div class="example-contents"><pre class="programlisting">
::logError( 'Bad search column ' . $_, { tag => 'search' } );
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ErrorDestination_notes"></a><h2>NOTES</h2><p>Specification of <code class="literal">tag=</code> does not currently work with
<code class="literal">[log type=error]...[/log]</code>.
</p></div><div class="refsect1"><a id="ErrorDestination_availability"></a><h2>AVAILABILITY</h2><p>ErrorDestination is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ErrorDestination_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_708_12449"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 708</strong></p><div class="figure-contents"><pre class="screen">
['ErrorDestination', 'hash', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12450"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ErrorDestination_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ErrorDestination_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ErrorFile" title="ErrorFile"><span class="citerefentry"><span class="refentrytitle">ErrorFile</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ErrorFile"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ErrorFile — specify error log filename
</p></div><div class="refsect1"><a id="ErrorFile_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="ErrorFile_description"></a><h2>DESCRIPTION</h2><p>Specify the error log file location.
</p><p>
The Interchange daemon must have the permission to create and write to the
specified file.
</p><p>
When using the directive on a <a href="glossary.html#catalog" class="olink">catalog</a> level, specifying absolute
filenames might not be allowed due to <code class="option">NoAbsolute</code>.
</p></div><div class="refsect1"><a id="ErrorFile_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="ErrorFile_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ErrorFile_2757"></a><p class="title"><strong>Example: Setting ErrorFile</strong></p><div class="example-contents"><pre class="programlisting">
ErrorLog /var/log/interchange/error.log
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ErrorFile_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ErrorFile_availability"></a><h2>AVAILABILITY</h2><p>ErrorFile is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ErrorFile_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_505_12049"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 505</strong></p><div class="figure-contents"><pre class="screen">
['ErrorFile', 'root_dir', undef],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3898__context_shows_lines_3898_3905__12050"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3898 (context shows lines 3898-3905)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir {
my($var, $value) = @_;
return '' unless $value;
$value = "$Global::VendRoot/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
return $value;
}
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_534_12051"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 534</strong></p><div class="figure-contents"><pre class="screen">
['ErrorFile', 'relative_dir', 'error.log'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3948__context_shows_lines_3948_3962__12052"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3948 (context shows lines 3948-3962)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_relative_dir {
my($var, $value) = @_;
if (absolute_or_relative($value)) {
config_error('Path %s not allowed in %s directive',
$value, $var);
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ErrorFile_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ErrorFile_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#SysLog" title="SysLog"><span class="citerefentry"><span class="refentrytitle">SysLog</span>(7ic)</span></a>, <a class="link" href="#ErrorDestination" title="ErrorDestination"><span class="citerefentry"><span class="refentrytitle">ErrorDestination</span>(7ic)</span></a>, <a class="link" href="#LogFile" title="LogFile"><span class="citerefentry"><span class="refentrytitle">LogFile</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ExecutionLocale"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ExecutionLocale — specify lowest-level locale
</p></div><div class="refsect1"><a id="ExecutionLocale_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>locale_definition</code></em> </p></div></div><div class="refsect1"><a id="ExecutionLocale_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the "lowest-level" <a href="glossary.html#locale" class="olink">locale</a>; the one that
will be re-set on every page so that the daemon cannot even accidentally be
left with a bad locale.
</p></div><div class="refsect1"><a id="ExecutionLocale_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ExecutionLocale_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_ExecutionLocale_3650"></a><p class="title"><strong>Example: Defining ExecutionLocale</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
ExecutionLocale de_DE
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ExecutionLocale_notes"></a><h2>NOTES</h2><p><code class="option">ExecutionLocale</code> defaults to "<code class="literal">C</code>" and you'll probably
never want to change it. There <span class="emphasis"><em>is</em></span> the need to change
locale while <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> is
running, of course, but this is done only for critical code sections and not
for the majority of other, "locale-independent" code.
To see the list of code "groups" that require a locale adjustment, run
<span class="command"><strong>locale</strong></span> and <span class="command"><strong>man locale</strong></span> on your Unix
system.
</p></div><div class="refsect1"><a id="ExecutionLocale_availability"></a><h2>AVAILABILITY</h2><p>ExecutionLocale is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ExecutionLocale_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_609_12295"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 609</strong></p><div class="figure-contents"><pre class="screen">
['ExecutionLocale', undef, 'C'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ExecutionLocale_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="ExecutionLocale_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Locale" title="Locale"><span class="citerefentry"><span class="refentrytitle">Locale</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="External"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>External — enable dump of selected global and catalog values for use by external programs
</p></div><div class="refsect1"><a id="External_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="External_description"></a><h2>DESCRIPTION</h2><p>The directive enables dump of selected global and catalog information for
use by external programs, possibly written in languages such as PHP, Python
or Ruby.
</p><p>
Dump file format is a direct <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> memory dump, internally most often
produced by invoking Perl's <code class="classname">Storable</code> methods.
</p><p>
The dump takes place at time of <a href="glossary.html#catalog" class="olink">catalog</a> (re)configuration.
</p><p>
Global <code class="option">External</code> must be enabled first to allow individual catalogs
to use <code class="option">External</code> themselves and dump their information.
</p></div><div class="refsect1"><a id="External_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="External_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_External_3354"></a><p class="title"><strong>Example: Defining External</strong></p><div class="example-contents"><p>Put the following in both global <code class="filename">interchange.cfg</code> and the specific
<code class="filename">catalog.cfg</code>s:</p><pre class="programlisting">
External yes
</pre></div></div><br class="example-break" /><div class="example"><a id="example_PHP_connector_for_accessing_the_structure_file_3355"></a><p class="title"><strong>Example: PHP connector for accessing the structure file</strong></p><div class="example-contents"><pre class="programlisting">
<?php
$interchange_base = '/usr/lib/interchange';
$interchange_lib = "$interchange_base/lib";
$interchange_struct = "/var/run/interchange/external.structure";
putenv("PERL_SIGNALS=unsafe");
umask(7);
$perl = new Perl();
$perlstring = "
use lib '$interchange_lib';
\$ENV{EXT_INTERCHANGE_FILE} = '$interchange_struct';
\$ENV{EXT_INTERCHANGE_DIR} = '$interchange_base';
";
$perl->eval($perlstring);
$perl->require("Vend/External.pm");
$origsid = $sid = $_COOKIE["MV_SESSION_ID"];
if(! $sid) {
$_REQUEST["mv_session_id"];
}
$cat = 'standard';
$catback = $perl->catalog($cat);
$out = "sid=$sid<br>";
$out .= "parm is debug=" . $_REQUEST["debug"] . "<br>";
$out .= "catalog is $catback<br>";
$out .= "now sid=$sid<br>";
$remote = $_SERVER['REMOTE_ADDR'];
$perl->remote_addr($remote);
$new = $perl->session($sid);
if($new) {
$sid = $perl->session_name();
$out .= "new session, now sid=$sid<br>";
}
if($sid != $origsid) {
setcookie('MV_SESSION_ID', $sid, 0 , '/');
}
## Can print now that cookie is set
print $out;
$fname = $perl->value("values","fname");
$lname = $perl->value("values","lname");
print "Well what do you know, we have a '$fname $lname'!<br>";
$cart = $perl->value('carts', 'main');
$nitems = count($cart);
if($nitems) {
print "We have a cart with $nitems items</br>";
for($i = 0; $i < $nitems; $i++) {
$code = $cart[$i]["code"];
$quantity = $cart[$i]["quantity"];
print "Item $code is in cart, quantity $quantity.<br>";
}
}
?>
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="External_notes"></a><h2>NOTES</h2><p>For discussion and examples of connecting Interchange to external programs,
see glossary entry <a href="glossary.html#external" class="olink">external</a>.
</p></div><div class="refsect1"><a id="External_availability"></a><h2>AVAILABILITY</h2><p>External is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="External_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_517_12203"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 517</strong></p><div class="figure-contents"><pre class="screen">
['External', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_710_12204"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 710</strong></p><div class="figure-contents"><pre class="screen">
['External', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12205"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="External_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="External_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ExternalFile" title="ExternalFile"><span class="citerefentry"><span class="refentrytitle">ExternalFile</span>(7ic)</span></a>, <a class="link" href="#ExternalExport" title="ExternalExport"><span class="citerefentry"><span class="refentrytitle">ExternalExport</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ExternalExport"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ExternalExport — specify Perl variables to dump to external file
</p></div><div class="refsect1"><a id="ExternalExport_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
Global: <em class="replaceable"><code>Interchange::Object</code></em>=<em class="replaceable"><code>Output_name</code></em>... <br />
Catalog: <em class="replaceable"><code>Object</code></em> [-><em class="replaceable"><code>key_or_index</code></em>]... </p></div></div><div class="refsect1"><a id="ExternalExport_description"></a><h2>DESCRIPTION</h2><p>The directive specifies <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> variables to dump to <code class="option">ExternalFile</code>.
</p><p>
On global level, using the equal sign ("<code class="literal">=</code>") it is possible
to specify original Perl structure and the resulting "translated" name in the
output file. Global elements appear directly under each catalog hash in the
output file.
</p><p>
On catalog level, it is not possible to "translate" names, but you can use
the notation "<code class="literal">-></code>" to dump specific elements from array
or hash structures. Catalog elements appear under hash key
"<code class="literal">external_config</code>" under each catalog hash in the
output file.
</p><p>
See <a class="xref" href="#ExternalExport_examples" title="EXAMPLES">the section called “EXAMPLES”</a> for clarification.
</p></div><div class="refsect1"><a id="ExternalExport_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="ExternalExport_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_ExternalExport_2878"></a><p class="title"><strong>Example: Defining ExternalExport</strong></p><div class="example-contents"><p>Here's a complete example and the expected result:
</p><p>
In <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
External yes
ExternalExport Global::Catalog=number_of_catalogs
ExternalFile /tmp/external
</pre><p>
In <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
External yes
ExternalExport <<EOD
CatalogName
ScratchDefault
ValuesDefault
ScratchDir
SessionDB
Sess
sionDatabase
SessionExpire
VendRoot
VendURL
SecureURL
Variable->SQLDSN
Variable->SQLPASS
Variable->SQLUSER
EOD
</pre><p>
After restarting Interchange, file <code class="filename">/tmp/external</code> will
be created with the following contents (shown here in human-readable
format):</p><pre class="programlisting">
{
'number_of_catalogs' => 4,
'Catalogs' => {
'catalog1' => {
'external_config' => {
'VendRoot' => '/home/interchange/catalog1',
'ValuesDefault' => {},
'CatalogName' => 'catalog1',
'SessionExpire' => 3600,
'ScratchDefault' => {
'mv_no_session_id' => '1',
'mv_no_count' => '1',
'mv_add_dot_html' => '1'
},
'SessionDB' => '',
'ScratchDir' => '/home/interchange/catalog1/tmp',
'VendURL' => 'http://myhost.mydomain.local/cgi-bin/catalog1',
'SessionDatabase' => '/home/interchange/catalog1/session',
'SecureURL' => 'http://myhost.mydomain.local/cgi-bin/catalog1',
'Variable' => {
'SQLUSER' => 'interch',
'SQLDSN' => 'dbi:Pg:dbname=catalog1',
'SQLPASS' => 'interch'
}
}
}
}
}
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ExternalExport_notes"></a><h2>NOTES</h2><p>For discussion and examples of connecting Interchange to external programs,
see glossary entry <a href="glossary.html#external" class="olink">external</a>.
</p></div><div class="refsect1"><a id="ExternalExport_availability"></a><h2>AVAILABILITY</h2><p>ExternalExport is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ExternalExport_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_519_12079"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 519</strong></p><div class="figure-contents"><pre class="screen">
['ExternalExport', undef, 'Global::Catalog=Catalog'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_711_12080"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 711</strong></p><div class="figure-contents"><pre class="screen">
['ExternalExport', undef, join " ", @External_directives],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ExternalExport_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="ExternalExport_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ExternalFile" title="ExternalFile"><span class="citerefentry"><span class="refentrytitle">ExternalFile</span>(7ic)</span></a>, <a class="link" href="#External" title="External"><span class="citerefentry"><span class="refentrytitle">External</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ExternalFile"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ExternalFile — specify external dump filename
</p></div><div class="refsect1"><a id="ExternalFile_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="ExternalFile_description"></a><h2>DESCRIPTION</h2><p>Specify "external" output filename. Default is
<code class="filename">external.structure</code> in global <code class="option">RunDir</code>.
</p><p>
For the directive to have any effect, <code class="option">External</code> must be enabled.
</p></div><div class="refsect1"><a id="ExternalFile_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="ExternalFile_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ExternalFile_2657"></a><p class="title"><strong>Example: Setting ExternalFile</strong></p><div class="example-contents"><p>In <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
External yes
ExternalFile /tmp/external
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ExternalFile_notes"></a><h2>NOTES</h2><p>For discussion and examples of connecting Interchange to external programs,
see glossary entry <a href="glossary.html#external" class="olink">external</a>.
</p></div><div class="refsect1"><a id="ExternalFile_availability"></a><h2>AVAILABILITY</h2><p>ExternalFile is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ExternalFile_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_518_12019"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 518</strong></p><div class="figure-contents"><pre class="screen">
['ExternalFile', 'root_dir', "$Global::RunDir/external.structure"],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3898__context_shows_lines_3898_3905__12020"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3898 (context shows lines 3898-3905)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir {
my($var, $value) = @_;
return '' unless $value;
$value = "$Global::VendRoot/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ExternalFile_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="ExternalFile_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ExternalExport" title="ExternalExport"><span class="citerefentry"><span class="refentrytitle">ExternalExport</span>(7ic)</span></a>, <a class="link" href="#External" title="External"><span class="citerefentry"><span class="refentrytitle">External</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ExtraSecure"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ExtraSecure — disallow unencrypted access to pages which are listed under AlwaysSecure
</p></div><div class="refsect1"><a id="ExtraSecure_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="ExtraSecure_description"></a><h2>DESCRIPTION</h2><p>Disallow access to pages which are listed under <code class="option">AlwaysSecure</code> unless
the browser is in HTTPS mode.
</p></div><div class="refsect1"><a id="ExtraSecure_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ExtraSecure_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_ExtraSecure_4601"></a><p class="title"><strong>Example: Enabling ExtraSecure</strong></p><div class="example-contents"><pre class="programlisting">
ExtraSecure 1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ExtraSecure_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ExtraSecure_availability"></a><h2>AVAILABILITY</h2><p>ExtraSecure is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ExtraSecure_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_649_12522"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 649</strong></p><div class="figure-contents"><pre class="screen">
['ExtraSecure', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12523"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ExtraSecure_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ExtraSecure_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AlwaysSecure" title="AlwaysSecure"><span class="citerefentry"><span class="refentrytitle">AlwaysSecure</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FallbackIP"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FallbackIP —
</p></div><div class="refsect1"><a id="FallbackIP_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="FallbackIP_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="FallbackIP_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="FallbackIP_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_FallbackIP_3883"></a><p class="title"><strong>Example: Enabling FallbackIP</strong></p><div class="example-contents"><pre class="programlisting">
FallbackIP yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="FallbackIP_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="FallbackIP_availability"></a><h2>AVAILABILITY</h2><p>FallbackIP is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="FallbackIP_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_650_12348"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 650</strong></p><div class="figure-contents"><pre class="screen">
['FallbackIP', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12349"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FallbackIP_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="FallbackIP_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Feature"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Feature — specify Interchange "feature" for activation in the catalog
</p></div><div class="refsect1"><a id="Feature_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>feature_name</code></em> </p></div></div><div class="refsect1"><a id="Feature_description"></a><h2>DESCRIPTION</h2><p>Specify <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> "feature" for inclusion in the current <a href="glossary.html#catalog" class="olink">catalog</a>.
</p><p>
For an introduction to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> "features", please see the
<a href="glossary.html#feature" class="olink">feature</a> glossary entry.
</p></div><div class="refsect1"><a id="Feature_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Feature_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Activating_a_feature_3818"></a><p class="title"><strong>Example: Activating a feature</strong></p><div class="example-contents"><pre class="programlisting">
Feature quickpoll
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Feature_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Feature_availability"></a><h2>AVAILABILITY</h2><p>Feature is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Feature_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_595_12333"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 595</strong></p><div class="figure-contents"><pre class="screen">
['Feature', 'feature', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2265__context_shows_lines_2265_2383__12334"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2265 (context shows lines 2265-2383)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_feature {
my ($var, $value) = @_;
my $c = $C->{$var} || {};
return $c unless $value;
$value =~ s/^\s+//;
$value =~ s/\s+$//;
my $fdir = Vend::File::catfile($Global::FeatureDir, $value);
unless(-d $fdir) {
config_warn("Feature '%s' not found, skipping.", $value);
return $c;
}
# Get the global install files and remove them from the config list
my @gfiles = glob("$fdir/*.global");
my %seen;
@seen{@gfiles} = @gfiles;
# Get the init files and remove them from the config list
my @ifiles = glob("$fdir/*.init");
@seen{@ifiles} = @ifiles;
# Get the uninstall files and remove them from the config list
my @ufiles = glob("$fdir/*.uninstall");
@seen{@ufiles} = @ifiles;
# Any other files are config files
my @cfiles = grep ! $seen{$_}++, glob("$fdir/*");
# directories are for copying
my @cdirs = grep -d $_, @cfiles;
# strip the directories from the config list, leaving catalog.cfg stuff
@cfiles = grep -f $_, @cfiles;
# Don't install global more than once
@gfiles = grep ! $Global::FeatureSeen{$_}++, @gfiles;
# Place the catalog configuration in the config list
unshift @include, @cfiles;
my @copy;
my $wanted = sub {
return unless -f $_;
my $n = $File::Find::name;
$n =~ s{^$fdir/}{};
my $d = $File::Find::dir;
$d =~ s{^$fdir/}{};
push @copy, [$n, $d];
};
if(@cdirs) {
File::Find::find({ wanted => $wanted, follow => 1 }, @cdirs);
}
#::logDebug("gfiles=" . ::uneval(\@gfiles));
#::logDebug("cfiles=" . ::uneval(\@cfiles));
#::logDebug("ifiles=" . ::uneval(\@ifiles));
#::logDebug("ufiles=" . ::uneval(\@ufiles));
#::logDebug("cdirs=" . ::uneval(\@cdirs));
#::logDebug("copy=" . ::uneval(\@copy));
for(@copy) {
my ($n, $d) = @$_;
my $tf = Vend::File::catfile($C->{VendRoot}, $n);
next if -f $tf;
my $td = Vend::File::catfile($C->{VendRoot}, $d);
unless(-d $td) {
File::Path::mkpath($td)
or do {
config_warn("Feature %s not able to make directory %s", $value, $td);
next;
};
}
File::Copy::copy("$fdir/$n", $tf)
or do {
config_warn("Feature %s not able to copy %s to %s", $value, "$fdir/$n", $tf);
next;
};
}
for(@gfiles) {
global_chunk($_);
}
if(@ifiles) {
my $initdir = Vend::File::catfile($C->{ConfDir}, 'init', $value);
File::Path::mkpath($initdir) unless -d $initdir;
my $unfile = Vend::File::catfile($initdir, 'uninstall');
## Feature was previously uninstalled, we *do* need to run init
my $ignore = -f $unfile;
if($ignore) {
unlink $unfile
or die errmsg("Couldn't unlink $unfile: $!");
}
for(@ifiles) {
my $fn = $_;
$fn =~ s{^$fdir/}{};
if($ignore) {
unlink "$initdir/$fn"
or die errmsg("Couldn't unlink $fn: $!");
}
next if -f "$initdir/$fn";
$C->{Init} ||= [];
push @{$C->{Init}}, [$_, "$initdir/$fn"];
}
}
#::logDebug("Init=" . ::uneval($C->{Init}));
$c->{$value} = 1;
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Feature_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="Feature_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#FeatureDir" title="FeatureDir"><span class="citerefentry"><span class="refentrytitle">FeatureDir</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FeatureDir"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FeatureDir — specify "feature" directory
</p></div><div class="refsect1"><a id="FeatureDir_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory_name</code></em> </p></div></div><div class="refsect1"><a id="FeatureDir_description"></a><h2>DESCRIPTION</h2><p>Specify directory containing <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> "feature" modules.
</p></div><div class="refsect1"><a id="FeatureDir_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="FeatureDir_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_FeatureDir_2869"></a><p class="title"><strong>Example: Setting FeatureDir</strong></p><div class="example-contents"><pre class="programlisting">
FeatureDir /usr/local/interchange/features
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="FeatureDir_notes"></a><h2>NOTES</h2><p>For an introduction to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> "features", please see the
<a href="glossary.html#feature" class="olink">feature</a> glossary entry.
</p></div><div class="refsect1"><a id="FeatureDir_availability"></a><h2>AVAILABILITY</h2><p>FeatureDir is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="FeatureDir_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_394_12077"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 394</strong></p><div class="figure-contents"><pre class="screen">
['FeatureDir', 'root_dir', 'features'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3898__context_shows_lines_3898_3905__12078"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3898 (context shows lines 3898-3905)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir {
my($var, $value) = @_;
return '' unless $value;
$value = "$Global::VendRoot/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FeatureDir_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="FeatureDir_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Feature" title="Feature"><span class="citerefentry"><span class="refentrytitle">Feature</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FileControl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FileControl — specify page names and Perl subroutines that implement access control
</p></div><div class="refsect1"><a id="FileControl_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>page_path</code></em> <em class="replaceable"><code>perl_routine</code></em> </p></div></div><div class="refsect1"><a id="FileControl_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">FileControl</code> directive allows you to control access
to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> pages by using an arbitrary decision method, implemented
as a <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> function. Perl functions may be provided in-place,
as <code class="option">Sub</code>s, or as <code class="option">GlobalSub</code>s.
</p><p>
The function is called with three parameters:
the filename, write flag, and <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> caller information.
The return value should be a <a href="glossary.html#boolean" class="olink">boolean</a>, specifying whether
access is allowed (a <a href="glossary.html#true" class="olink">true</a> value) or not (a <a href="glossary.html#false" class="olink">false</a>
value).
</p><p>
See <a class="xref" href="#FileControl_examples" title="EXAMPLES">the section called “EXAMPLES”</a>.
</p></div><div class="refsect1"><a id="FileControl_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="FileControl_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_FileControl_routine_in_place_3103"></a><p class="title"><strong>Example: Specifying FileControl routine in-place</strong></p><div class="example-contents"><pre class="programlisting">
FileControl test_page <<EOR
sub {
my ($fn, $write, @caller) = @_;
# Allow write to files containing "foo" in filename
if( $write ) {
return $fn =~ /foo/;
}
# Allow read for files NOT containing "bar" in filename
return $fn !~ /bar/;
}
EOR
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Specifying_FileControl_routine_as_a_Sub_or_GlobalSub_3104"></a><p class="title"><strong>Example: Specifying FileControl routine as a Sub or GlobalSub</strong></p><div class="example-contents"><pre class="programlisting">
Sub <<EOF
sub filecontrol_access {
my ($fn, $write, @caller) = @_;
# Allow write to files containing "foo" in filename
if( $write ) {
return $fn =~ /foo/;
}
# Allow read for files NOT containing "bar" in filename
return $fn !~ /bar/;
}
EOF
FileControl test_directory/test_page filecontrol_access
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Specifying_FileControl_as_a_mapped_routine_name_3105"></a><p class="title"><strong>Example: Specifying FileControl as a mapped routine name</strong></p><div class="example-contents"><p>In <code class="filename">interchange.cfg</code>, you can use mapped routine names:</p><pre class="programlisting">
FileControl test_page Vend::YourModule::file_control
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="FileControl_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="FileControl_availability"></a><h2>AVAILABILITY</h2><p>FileControl is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="FileControl_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_465_12134"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 465</strong></p><div class="figure-contents"><pre class="screen">
['FileControl', 'action', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_536_12135"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 536</strong></p><div class="figure-contents"><pre class="screen">
['FileControl', 'action', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2152__context_shows_lines_2152_2249__12136"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2152 (context shows lines 2152-2249)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_action {
my ($var, $value, $mapped) = @_;
if (! $value) {
return $InitializeEmpty{$var} ? '' : {};
}
return if $Vend::ExternalProgram;
my $c;
if($mapped) {
$c = $mapped;
}
elsif(defined $C) {
$c = $C->{$var} ||= {};
}
else {
no strict 'refs';
$c = ${"Global::$var"} ||= {};
}
if (defined $C and ! $c->{_mvsafe}) {
my $calc = Vend::Interpolate::reset_calc();
$c->{_mvsafe} = $calc;
}
my ($name, $sub) = split /\s+/, $value, 2;
$name =~ s/-/_/g;
## Determine if we are in a catalog config, and if
## perl should be global and/or strict
my $nostrict;
my $perlglobal = 1;
if($C) {
$nostrict = $Global::PerlNoStrict->{$C->{CatalogName}};
$perlglobal = $Global::AllowGlobal->{$C->{CatalogName}};
}
# Untaint and strip this pup
$sub =~ s/^\s*((?s:.)*\S)\s*//;
$sub = $1;
if($sub !~ /\s/) {
no strict 'refs';
if($sub =~ /::/ and ! $C) {
$c->{$name} = \&{"$sub"};
}
else {
if($C and $C->{Sub}) {
$c->{$name} = $C->{Sub}{$sub};
}
if(! $c->{$name} and $Global::GlobalSub) {
$c->{$name} = $Global::GlobalSub->{$sub};
}
}
if(! $c->{$name} and $AllowScalarAction{$var}) {
$c->{$name} = $sub;
}
elsif(! $c->{$name}) {
$@ = errmsg("Mapped %s action routine '%s' is non-existent.", $var, $sub);
}
}
elsif ( ! $mapped and $sub !~ /^sub\b/) {
if($AllowScalarAction{$var}) {
$c->{$name} = $sub;
}
else {
my $code = <<EOF;
sub {
return Vend::Interpolate::interpolate_html(<<EndOfThisHaiRYTHING);
$sub
EndOfThisHaiRYTHING
}
EOF
$c->{$name} = eval $code;
}
}
elsif ($perlglobal) {
package Vend::Interpolate;
if($nostrict) {
no strict;
$c->{$name} = eval $sub;
}
else {
$c->{$name} = eval $sub;
}
}
else {
package Vend::Interpolate;
$c->{$name} = $c->{_mvsafe}->reval($sub);
}
if($@) {
config_warn("Action '%s' did not compile correctly (%s).", $name, $@);
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FileControl_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="FileControl_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FileDatabase"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FileDatabase — specify table and column to look up in search for file contents
</p></div><div class="refsect1"><a id="FileDatabase_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>table_name</code></em> [:<em class="replaceable"><code>column_name</code></em>]</p></div></div><div class="refsect1"><a id="FileDatabase_description"></a><h2>DESCRIPTION</h2><p>Besides retrieving file contents from files on the filesystem (as usual),
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> has the ability to retrieve file contents from the <a href="glossary.html#database" class="olink">database</a>.
</p><p>
The standard <code class="option">FileDatabase</code> setting includes the appropriate
table and column names.
</p><p>
In case the column is unspecified, it defaults
to the current value of global variable <code class="varname">LANG</code>. In case
the column named after <code class="varname">LANG</code> value does not exist, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>
finally tries with the column <span class="database">default</span>.
</p></div><div class="refsect1"><a id="FileDatabase_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="FileDatabase_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_FileDatabase_4162"></a><p class="title"><strong>Example: Defining FileDatabase</strong></p><div class="example-contents"><pre class="programlisting">
FileDatabase files:data
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Defining_FileDatabase__defaulting_to_LANG_or__default__column_4163"></a><p class="title"><strong>Example: Defining FileDatabase, defaulting to LANG or 'default' column</strong></p><div class="example-contents"><pre class="programlisting">
FileDatabase files
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="FileDatabase_notes"></a><h2>NOTES</h2><p>The file database must, as always, be registered first with the
<code class="option">Database</code> directive.
</p><p>
Files in the filesystem, if they exist, always take precedence over file
contents in the database.
right place for your files.
</p></div><div class="refsect1"><a id="FileDatabase_availability"></a><h2>AVAILABILITY</h2><p>FileDatabase is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="FileDatabase_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_615_12409"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 615</strong></p><div class="figure-contents"><pre class="screen">
['FileDatabase', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FileDatabase_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="FileDatabase_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DirectiveDatabase" title="DirectiveDatabase"><span class="citerefentry"><span class="refentrytitle">DirectiveDatabase</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Filter"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Filter — specify variables and filters through which they should be run through automatically
</p></div><div class="refsect1"><a id="Filter_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>variable_name</code></em>
<em class="replaceable"><code>filter_name</code></em>
... </p></div></div><div class="refsect1"><a id="Filter_description"></a><h2>DESCRIPTION</h2><p>The directive specifies one or more <a href="glossary.html#filter" class="olink">filter</a>s
that should automatically be applied to <a href="glossary.html#CGI" class="olink">CGI</a>
<a href="glossary.html#variable" class="olink">variable</a>s.
</p><p>
That way, by the time you get to call <code class="sgmltag-element">cgi</code>, the
variable value is already filtered and ready for use.
</p></div><div class="refsect1"><a id="Filter_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Filter_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Automatically_filtering__mail_lists__variable_3802"></a><p class="title"><strong>Example: Automatically filtering "mail_lists" variable</strong></p><div class="example-contents"><p>Some variables submitted by the user come back null-separated, such as
values from multi-select boxes where the selected items are separated
by null (<code class="literal">\0</code>) characters. To automatically change those
nulls to spaces, you could use this directive:</p><pre class="programlisting">
Filter mail_lists null_to_space
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Applying_multiple_filters_to_a_variable_3803"></a><p class="title"><strong>Example: Applying multiple filters to a variable</strong></p><div class="example-contents"><pre class="programlisting">
Filter firstname "lc ucfirst"
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Filter_notes"></a><h2>NOTES</h2><p>You could also use the <code class="sgmltag-element">filter</code> tag, but in the long
run the <code class="option">Filter</code> approach reduces typing and minimizes the chance
of omission.
</p></div><div class="refsect1"><a id="Filter_availability"></a><h2>AVAILABILITY</h2><p>Filter is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Filter_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_623_12330"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 623</strong></p><div class="figure-contents"><pre class="screen">
['Filter', 'hash', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12331"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Filter_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Filter_seeAlso"></a><h2>SEE ALSO</h2><p><a href="orderchecks.html#filter" class="olink"><span class="citerefentry"><span class="refentrytitle">filter</span>(7ic)</span></a>, <a class="link" href="#CodeDef" title="CodeDef"><span class="citerefentry"><span class="refentrytitle">CodeDef</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FormAction"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FormAction — define or override form action
</p></div><div class="refsect1"><a id="FormAction_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>action_name</code></em>
<em class="replaceable"><code>perl_code</code></em>
</p></div></div><div class="refsect1"><a id="FormAction_description"></a><h2>DESCRIPTION</h2><p>The directive allows definition of <a href="glossary.html#form-action" class="olink">form action</a>s. Some pre-defined
actions that you might already be familiar with are
<code class="literal">return</code>,
<code class="literal">submit</code> or
<code class="literal">refresh</code>.
</p></div><div class="refsect1"><a id="FormAction_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="FormAction_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Checkout_Action_3226"></a><p class="title"><strong>Example: Checkout Action</strong></p><div class="example-contents"><p>This action can be used on the shopping cart page to update the cart
and go to the checkout page with an image button.</p><pre class="programlisting">
FormAction checkout <<EOR
sub {
$Tag->update('quantity');
$CGI->{mv_nextpage} = 'checkout';
return 1;
}
EOR
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="FormAction_notes"></a><h2>NOTES</h2><p>Catalog version of the directive is protected by <code class="classname">Safe</code>.
</p><p>
For a complete discussion, please see the <a href="glossary.html#form-action" class="olink">form action</a> glossary entry.
</p></div><div class="refsect1"><a id="FormAction_availability"></a><h2>AVAILABILITY</h2><p>FormAction is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="FormAction_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_466_12169"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 466</strong></p><div class="figure-contents"><pre class="screen">
['FormAction', 'action', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_537_12170"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 537</strong></p><div class="figure-contents"><pre class="screen">
['FormAction', 'action', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2152__context_shows_lines_2152_2249__12171"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2152 (context shows lines 2152-2249)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_action {
my ($var, $value, $mapped) = @_;
if (! $value) {
return $InitializeEmpty{$var} ? '' : {};
}
return if $Vend::ExternalProgram;
my $c;
if($mapped) {
$c = $mapped;
}
elsif(defined $C) {
$c = $C->{$var} ||= {};
}
else {
no strict 'refs';
$c = ${"Global::$var"} ||= {};
}
if (defined $C and ! $c->{_mvsafe}) {
my $calc = Vend::Interpolate::reset_calc();
$c->{_mvsafe} = $calc;
}
my ($name, $sub) = split /\s+/, $value, 2;
$name =~ s/-/_/g;
## Determine if we are in a catalog config, and if
## perl should be global and/or strict
my $nostrict;
my $perlglobal = 1;
if($C) {
$nostrict = $Global::PerlNoStrict->{$C->{CatalogName}};
$perlglobal = $Global::AllowGlobal->{$C->{CatalogName}};
}
# Untaint and strip this pup
$sub =~ s/^\s*((?s:.)*\S)\s*//;
$sub = $1;
if($sub !~ /\s/) {
no strict 'refs';
if($sub =~ /::/ and ! $C) {
$c->{$name} = \&{"$sub"};
}
else {
if($C and $C->{Sub}) {
$c->{$name} = $C->{Sub}{$sub};
}
if(! $c->{$name} and $Global::GlobalSub) {
$c->{$name} = $Global::GlobalSub->{$sub};
}
}
if(! $c->{$name} and $AllowScalarAction{$var}) {
$c->{$name} = $sub;
}
elsif(! $c->{$name}) {
$@ = errmsg("Mapped %s action routine '%s' is non-existent.", $var, $sub);
}
}
elsif ( ! $mapped and $sub !~ /^sub\b/) {
if($AllowScalarAction{$var}) {
$c->{$name} = $sub;
}
else {
my $code = <<EOF;
sub {
return Vend::Interpolate::interpolate_html(<<EndOfThisHaiRYTHING);
$sub
EndOfThisHaiRYTHING
}
EOF
$c->{$name} = eval $code;
}
}
elsif ($perlglobal) {
package Vend::Interpolate;
if($nostrict) {
no strict;
$c->{$name} = eval $sub;
}
else {
$c->{$name} = eval $sub;
}
}
else {
package Vend::Interpolate;
$c->{$name} = $c->{_mvsafe}->reval($sub);
}
if($@) {
config_warn("Action '%s' did not compile correctly (%s).", $name, $@);
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FormAction_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="FormAction_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#UserTag" title="UserTag"><span class="citerefentry"><span class="refentrytitle">UserTag</span>(7ic)</span></a>, <a class="link" href="#CodeDef" title="CodeDef"><span class="citerefentry"><span class="refentrytitle">CodeDef</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FormIgnore"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FormIgnore — specify variables that should not be propagated from CGI to Values space
</p></div><div class="refsect1"><a id="FormIgnore_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>variable_name</code></em>
... </p></div></div><div class="refsect1"><a id="FormIgnore_description"></a><h2>DESCRIPTION</h2><p>The directive specifies variables that should not be propagated from the
<a href="glossary.html#CGI" class="olink">CGI</a> into <a href="glossary.html#value" class="olink">value</a>s space, when a call such as
<code class="code">[update values]</code> is made.
</p></div><div class="refsect1"><a id="FormIgnore_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="FormIgnore_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_FormIgnore_4245"></a><p class="title"><strong>Example: Defining FormIgnore</strong></p><div class="example-contents"><pre class="programlisting">
FormIgnore mv_searchtype
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="FormIgnore_notes"></a><h2>NOTES</h2><p>See <a href="glossary.html#CGI" class="olink">CGI</a> and <a href="glossary.html#value" class="olink">value</a> glossary entries for an
introduction and discussion.
</p></div><div class="refsect1"><a id="FormIgnore_availability"></a><h2>AVAILABILITY</h2><p>FormIgnore is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="FormIgnore_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_669_12434"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 669</strong></p><div class="figure-contents"><pre class="screen">
['FormIgnore', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12435"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FormIgnore_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="FormIgnore_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FractionalItems"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FractionalItems — allow fractional quantities in the shopping cart
</p></div><div class="refsect1"><a id="FractionalItems_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="FractionalItems_description"></a><h2>DESCRIPTION</h2><p>The directive specifies whether
the quantity of items in the shopping cart could be fractional,
such as <code class="literal">2.5</code> or <code class="literal">1.25</code>.
</p></div><div class="refsect1"><a id="FractionalItems_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="FractionalItems_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_FractionalItems_4329"></a><p class="title"><strong>Example: Enabling FractionalItems</strong></p><div class="example-contents"><pre class="programlisting">
FractionalItems Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="FractionalItems_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="FractionalItems_availability"></a><h2>AVAILABILITY</h2><p>FractionalItems is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="FractionalItems_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_664_12453"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 664</strong></p><div class="figure-contents"><pre class="screen">
['FractionalItems', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12454"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FractionalItems_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="FractionalItems_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FullUrl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FullUrl — use full URLs (those including hostnames) in catalog definition lines
</p></div><div class="refsect1"><a id="FullUrl_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="FullUrl_description"></a><h2>DESCRIPTION</h2><p>When a page request comes to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>, the <a href="glossary.html#catalog" class="olink">catalog</a> to invoke is
determined from CGI value <code class="literal">SCRIPT_NAME</code>.
</p><p>
For example,
if a request for <code class="literal">www.example.com/cat1</code> comes in,
<code class="literal">SCRIPT_NAME</code> will be "<code class="literal">/cat1</code>".
If a request for <code class="literal">www.example.com</code> comes in,
<code class="literal">SCRIPT_NAME</code> will be "<code class="literal">/</code>".
</p><p>
By default, hostnames are not honored, so different catalogs cannot use the
same <code class="literal">SCRIPT_NAME</code> under the same <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server. This prevents
multiple domains from serving their <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> pages directly from www.HOSTNAME.com
(as there can only be one "<code class="literal">/</code>" script name).
</p><p>
With <code class="option">FullUrl</code> enabled, catalog selection includes the hostname
and it becomes possible to uniquely determine catalog name based on both
hostname and script name.
</p><p>
See the <code class="option">Catalog</code> directive for further discussion and concrete
examples.
</p></div><div class="refsect1"><a id="FullUrl_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="FullUrl_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_FullUrl_2623"></a><p class="title"><strong>Example: Enabling FullUrl</strong></p><div class="example-contents"><pre class="programlisting">
FullUrl yes
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Catalog_definition_example_with_FullUrl_enabled_2624"></a><p class="title"><strong>Example: Catalog definition example with FullUrl enabled</strong></p><div class="example-contents"><p>An example from <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
FullUrl yes
Catalog standard /path/to/catalogs/standard/ myhost.mydomain.local/cgi-bin/standard
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="FullUrl_notes"></a><h2>NOTES</h2><p>If <code class="option">FullUrl</code> is defined, <span class="bold"><strong>you must modify all
<code class="option">Catalog</code> lines in your <code class="filename">interchange.cfg</code> to include the hostname —
<code class="option">FullUrl</code> and non-<code class="option">FullUrl</code> <code class="option">Catalog</code> specifications
are not compatible.</strong></span>
</p></div><div class="refsect1"><a id="FullUrl_availability"></a><h2>AVAILABILITY</h2><p>FullUrl is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="FullUrl_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_470_12009"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 470</strong></p><div class="figure-contents"><pre class="screen">
['FullUrl', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12010"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FullUrl_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="FullUrl_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Catalog" title="Catalog"><span class="citerefentry"><span class="refentrytitle">Catalog</span>(7ic)</span></a>, <a class="link" href="#SubCatalog" title="SubCatalog"><span class="citerefentry"><span class="refentrytitle">SubCatalog</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="FullUrlIgnorePort"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>FullUrlIgnorePort — <span class="inlinemediaobject"><img src="./images/new.png" /></span>
</p></div><div class="refsect1"><a id="FullUrlIgnorePort_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="FullUrlIgnorePort_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="FullUrlIgnorePort_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="FullUrlIgnorePort_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="FullUrlIgnorePort_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="FullUrlIgnorePort_availability"></a><h2>AVAILABILITY</h2><p>FullUrlIgnorePort is available in Interchange versions:
</p><p>
5.7.0 (git-head)</p></div><div class="refsect1"><a id="FullUrlIgnorePort_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_471_12027"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 471</strong></p><div class="figure-contents"><pre class="screen">
['FullUrlIgnorePort', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12028"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="FullUrlIgnorePort_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="FullUrlIgnorePort_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Glimpse"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Glimpse — specify program path and options for the Glimpse search engine
</p></div><div class="refsect1"><a id="Glimpse_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>program_path</code></em> [<em class="replaceable"><code>option</code></em>...]</p></div></div><div class="refsect1"><a id="Glimpse_description"></a><h2>DESCRIPTION</h2><p>The directive specifies pathname for the <span class="command"><strong>glimpse</strong></span> command, used if glimpse
searches are to be enabled.
To use <span class="command"><strong>glimpseserver</strong></span>, the
<code class="literal">-C</code>, <code class="literal">-J</code> and <code class="literal">-K</code> options must be
specified.
</p></div><div class="refsect1"><a id="Glimpse_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Glimpse_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_Glimpse_4645"></a><p class="title"><strong>Example: Defining Glimpse</strong></p><div class="example-contents"><pre class="programlisting">
Glimpse /usr/local/bin/glimpse -C -J srch_engine -K2345
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Glimpse_notes"></a><h2>NOTES</h2><p>Glimpse was once-popular search engine in the Linux world, but its non-free status and other
things called for its replacement. We suggest you use Swish-e which is supported by
<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> as well.
</p></div><div class="refsect1"><a id="Glimpse_availability"></a><h2>AVAILABILITY</h2><p>Glimpse is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Glimpse_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_604_12532"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 604</strong></p><div class="figure-contents"><pre class="screen">
['Glimpse', 'executable', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4030__context_shows_lines_4030_4086__12533"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4030 (context shows lines 4030-4086)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_executable {
my($var, $initial) = @_;
my($x);
my(@tries);
if(ref $initial) {
@tries = @$initial;
}
else {
@tries = $initial;
}
TRYEXE:
foreach my $value (@tries) {
#::logDebug("trying $value for $var");
my $root = $value;
$root =~ s/\s.*//;
return $value if $Global::Windows;
if( ! defined $value or $value eq '') {
$x = '';
}
elsif( $value eq 'none') {
$x = 'none';
last;
}
elsif( $value =~ /^\w+::[:\w]+\w$/) {
## Perl module like Net::SMTP
eval {
eval "require $value";
die if $@;
$x = $value;
};
last if $x;
}
elsif ($root =~ m#^/# and -x $root) {
$x = $value;
last;
}
else {
my @path = split /:/, $ENV{PATH};
for (@path) {
next unless -x "$_/$root";
$x = $value;
last TRYEXE;
}
}
}
config_error( errmsg(
"Can't find executable (%s) for the %s directive\n",
join('|', @tries),
$var,
)
) unless defined $x;
#::logDebug("$var=$x");
return $x;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Glimpse_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Glimpse_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="GlobalSub"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>GlobalSub — define global Perl functions for use within Interchange
</p></div><div class="refsect1"><a id="GlobalSub_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<code class="literal">Sub</code>
<em class="replaceable"><code>perl_code</code></em>
</p></div></div><div class="refsect1"><a id="GlobalSub_description"></a><h2>DESCRIPTION</h2><p>Define a global subroutine for use within <code class="sgmltag-element">perl</code>, <code class="sgmltag-element">mvasp</code>, or
embedded <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> languages.
</p><p>
The use of "here document" syntax in <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> makes subroutine definitions
visually convenient.
</p></div><div class="refsect1"><a id="GlobalSub_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="GlobalSub_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_a_global_subroutine_3157"></a><p class="title"><strong>Example: Defining a global subroutine</strong></p><div class="example-contents"><pre class="programlisting">
GlobalSub <<EOF
sub count_orders {
my $counter = new File::CounterFile "tmp/count_orders", '1';
my $number = $counter->inc();
return "There have been $number orders placed.\n";
}
EOF
</pre><p>
The above code would be called from an <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> page in the following way:</p><pre class="programlisting">
[perl tables=products subs='count_orders']
return count_orders();
[/perl]
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="GlobalSub_notes"></a><h2>NOTES</h2><p>As with <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> "here documents," the "<code class="literal">EOF</code>" (or arbitrarily
named end marker) must be the <span class="emphasis"><em>only</em></span> thing on the line,
without leading or trailing white space. Also, do not append a semicolon to the
opening marker (as you would in <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a>).
</p><p>
Global subroutines are not subject to <code class="classname">Safe</code> security
checks. They can do most anything!
Therefore, <a href="glossary.html#scratch" class="olink">scratch</a> or catalog subroutines (<code class="option">Sub</code>s) are
preferred in most cases to protect the innocent.
</p></div><div class="refsect1"><a id="GlobalSub_availability"></a><h2>AVAILABILITY</h2><p>GlobalSub is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="GlobalSub_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_468_12149"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 468</strong></p><div class="figure-contents"><pre class="screen">
['GlobalSub', 'subroutine', ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="GlobalSub_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="GlobalSub_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AllowGlobal" title="AllowGlobal"><span class="citerefentry"><span class="refentrytitle">AllowGlobal</span>(7ic)</span></a>, <a class="link" href="#Sub" title="Sub"><span class="citerefentry"><span class="refentrytitle">Sub</span>(7ic)</span></a>, <a class="link" href="#CodeDef" title="CodeDef"><span class="citerefentry"><span class="refentrytitle">CodeDef</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="HTMLsuffix"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>HTMLsuffix — specify filename extension for files in the PageDir and TemplateDir directories
</p></div><div class="refsect1"><a id="HTMLsuffix_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>file_extension</code></em> </p></div></div><div class="refsect1"><a id="HTMLsuffix_description"></a><h2>DESCRIPTION</h2><p>Specify extension (suffix) to use with filenames when looking for the
source files in the <code class="filename">pages/</code> directory.
</p><p>
If a page with the configured suffix does not exist on the disk, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> will
unconditionally try the usual "<code class="literal">.html</code>" variant.
</p><p>
Note that
this setting applies strictly to the disk file lookup —
page names in the users' browsers will always appear as
"<code class="literal">.html</code>".
</p></div><div class="refsect1"><a id="HTMLsuffix_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="HTMLsuffix_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_HTMLsuffix_4503"></a><p class="title"><strong>Example: Setting HTMLsuffix</strong></p><div class="example-contents"><pre class="programlisting">
HTMLsuffix .htm
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_HTMLsuffix_4504"></a><p class="title"><strong>Example: Setting HTMLsuffix</strong></p><div class="example-contents"><pre class="programlisting">
HTMLsuffix .itl
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="HTMLsuffix_notes"></a><h2>NOTES</h2><p>The way <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> looks for pages is <a href="glossary.html#locale" class="olink">locale</a>-sensitive. Besides the default
HTML suffix which is set using this <code class="option">HTMLsuffix</code> directive, you can
set locale-dependent suffixes using <code class="option">Locale</code>.
</p></div><div class="refsect1"><a id="HTMLsuffix_availability"></a><h2>AVAILABILITY</h2><p>HTMLsuffix is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="HTMLsuffix_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_689_12494"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 689</strong></p><div class="figure-contents"><pre class="screen">
['HTMLsuffix', undef, '.html'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="HTMLsuffix_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="HTMLsuffix_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Locale" title="Locale"><span class="citerefentry"><span class="refentrytitle">Locale</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="HammerLock"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>HammerLock — number of seconds after which a locked session is considered lost due to malfunction
</p></div><div class="refsect1"><a id="HammerLock_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>interval</code></em> </p></div></div><div class="refsect1"><a id="HammerLock_description"></a><h2>DESCRIPTION</h2><p>The directive specifies an interval after which a locked session could be
considered lost due to malfunction. This will also clean up the session lock.
</p></div><div class="refsect1"><a id="HammerLock_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="HammerLock_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Adjusting_the_HammerLock_interval_2526"></a><p class="title"><strong>Example: Adjusting the HammerLock interval</strong></p><div class="example-contents"><pre class="programlisting">
HammerLock 1 minute
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="HammerLock_notes"></a><h2>NOTES</h2><p>This directive is only present to monitor session hand-offs.
If a message generated by this directive shows up in error logs, the
system setup should be examined.
</p><p>
When file-based <a href="glossary.html#session" class="olink">session</a>s are used, this directive mostly
does not apply.
</p></div><div class="refsect1"><a id="HammerLock_availability"></a><h2>AVAILABILITY</h2><p>HammerLock is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="HammerLock_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_502_11982"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 502</strong></p><div class="figure-contents"><pre class="screen">
['HammerLock', 'time', 30],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4088__context_shows_lines_4088_4100__11983"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4088 (context shows lines 4088-4100)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_time {
my($var, $value) = @_;
my($n);
return $value unless $value;
# $C->{Source}->{$var} = [$value];
$n = time_to_seconds($value);
config_error("Bad time format ('$value') in the $var directive\n")
unless defined $n;
$n;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="HammerLock_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="HammerLock_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DNSBL" title="DNSBL"><span class="citerefentry"><span class="refentrytitle">DNSBL</span>(7ic)</span></a>, <a class="link" href="#SaveExpire" title="SaveExpire"><span class="citerefentry"><span class="refentrytitle">SaveExpire</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="History"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>History — how many most-recent user clicks should be saved in session history
</p></div><div class="refsect1"><a id="History_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>count</code></em> </p></div></div><div class="refsect1"><a id="History_description"></a><h2>DESCRIPTION</h2><p>The directive specifies
how many of the most recent user clicks should be stored in the <a href="glossary.html#session" class="olink">session</a>
history.
</p></div><div class="refsect1"><a id="History_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="History_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_History_4039"></a><p class="title"><strong>Example: Defining History</strong></p><div class="example-contents"><pre class="programlisting">
History 10
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="History_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="History_availability"></a><h2>AVAILABILITY</h2><p>History is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="History_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_576_12381"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 576</strong></p><div class="figure-contents"><pre class="screen">
['History', 'integer', 0],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3965__context_shows_lines_3965_3972__12382"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3965 (context shows lines 3965-3972)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_integer {
my($var, $value) = @_;
$value = hex($value) if $value =~ /^0x[\dA-Fa-f]+$/;
$value = oct($value) if $value =~ /^0[0-7]+$/;
config_error("The $var directive (now set to '$value') must be an integer\n")
unless $value =~ /^\d+$/;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="History_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="History_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="HitCount"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>HitCount — increment a counter on every catalog access
</p></div><div class="refsect1"><a id="HitCount_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="HitCount_description"></a><h2>DESCRIPTION</h2><p>Specify whether the catalog counter file should be increased on every
access to the catalog.
</p><p>
The counter filename will be <code class="filename">hits.<em class="replaceable"><code>catalog_name</code></em></code>, placed in the <code class="filename"><a href="glossary.html#ICROOT" class="olink">ICROOT</a>/etc/</code> directory.
</p></div><div class="refsect1"><a id="HitCount_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="HitCount_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_HitCount_3072"></a><p class="title"><strong>Example: Enabling HitCount</strong></p><div class="example-contents"><pre class="programlisting">
HitCount Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="HitCount_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="HitCount_availability"></a><h2>AVAILABILITY</h2><p>HitCount is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="HitCount_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_473_12127"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 473</strong></p><div class="figure-contents"><pre class="screen">
['HitCount', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12128"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="HitCount_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="HitCount_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#TrackFile" title="TrackFile"><span class="citerefentry"><span class="refentrytitle">TrackFile</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="HostnameLookups"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>HostnameLookups — perform hostname lookups (DNS resolving)
</p></div><div class="refsect1"><a id="HostnameLookups_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="HostnameLookups_description"></a><h2>DESCRIPTION</h2><p>The directive specifies whether to perform DNS lookups to resolve
remote users' hostname from their IP address. Hostnames are required
for some facilities, such as <code class="option">RobotHost</code> (use <code class="option">RobotIP</code> if you
want to keep DNS lookups off).
</p><p>
If the web server is configured to perform hostname lookups itself, then
this directive should remain disabled.
</p></div><div class="refsect1"><a id="HostnameLookups_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="HostnameLookups_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_HostnameLookups_2733"></a><p class="title"><strong>Example: Enabling HostnameLookups</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
HostnameLookups Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="HostnameLookups_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="HostnameLookups_availability"></a><h2>AVAILABILITY</h2><p>HostnameLookups is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="HostnameLookups_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_488_12041"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 488</strong></p><div class="figure-contents"><pre class="screen">
['HostnameLookups', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12042"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="HostnameLookups_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="HostnameLookups_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="HotDBI"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>HotDBI — specify catalogs that should use persistent database connections
</p></div><div class="refsect1"><a id="HotDBI_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>catalog</code></em>... </p></div></div><div class="refsect1"><a id="HotDBI_description"></a><h2>DESCRIPTION</h2><p>Specify <a href="glossary.html#catalog" class="olink">catalog</a>s that should use persistent database connections.
When a connection is persistent, it will be maintained and cached without
reconnecting for every page request.
</p></div><div class="refsect1"><a id="HotDBI_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="HotDBI_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_HotDBI_3292"></a><p class="title"><strong>Example: Specifying HotDBI</strong></p><div class="example-contents"><pre class="programlisting">
HotDBI tutorial1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="HotDBI_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="HotDBI_availability"></a><h2>AVAILABILITY</h2><p>HotDBI is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="HotDBI_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_501_12187"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 501</strong></p><div class="figure-contents"><pre class="screen">
['HotDBI', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12188"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="HotDBI_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="HotDBI_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="HouseKeeping"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>HouseKeeping — specify number of seconds between periodic "house keeping" jobs
</p></div><div class="refsect1"><a id="HouseKeeping_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>interval</code></em> </p></div></div><div class="refsect1"><a id="HouseKeeping_description"></a><h2>DESCRIPTION</h2><p>Specify periodic time <a href="glossary.html#interval" class="olink">interval</a> at which the Interchange server should
<span class="emphasis"><em>wake up</em></span> and
look for user reconfiguration requests and hung processes. On some
systems, this wakeup is the only time the server will terminate in response
to a <code class="literal">-stop</code> command.
</p></div><div class="refsect1"><a id="HouseKeeping_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="HouseKeeping_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Adjusting_the_HouseKeeping_interval_to_120_seconds_2605"></a><p class="title"><strong>Example: Adjusting the HouseKeeping interval to 120 seconds</strong></p><div class="example-contents"><pre class="programlisting">
HouseKeeping 2 minutes
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Adjusting_the_HouseKeeping_interval_to_1_hour_2606"></a><p class="title"><strong>Example: Adjusting the HouseKeeping interval to 1 hour</strong></p><div class="example-contents"><pre class="programlisting">
HouseKeeping 1 hour
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="HouseKeeping_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="HouseKeeping_availability"></a><h2>AVAILABILITY</h2><p>HouseKeeping is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="HouseKeeping_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_458_12005"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 458</strong></p><div class="figure-contents"><pre class="screen">
['HouseKeeping', 'time', 60],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4088__context_shows_lines_4088_4100__12006"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4088 (context shows lines 4088-4100)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_time {
my($var, $value) = @_;
my($n);
return $value unless $value;
# $C->{Source}->{$var} = [$value];
$n = time_to_seconds($value);
config_error("Bad time format ('$value') in the $var directive\n")
unless defined $n;
$n;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="HouseKeeping_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="HouseKeeping_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#HouseKeepingCron" title="HouseKeepingCron"><span class="citerefentry"><span class="refentrytitle">HouseKeepingCron</span>(7ic)</span></a>, <a class="link" href="#PIDcheck" title="PIDcheck"><span class="citerefentry"><span class="refentrytitle">PIDcheck</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="HouseKeepingCron"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>HouseKeepingCron — define Interchange-aware crontab entries
</p></div><div class="refsect1"><a id="HouseKeepingCron_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>seconds</code></em>
<em class="replaceable"><code>minutes</code></em>
<em class="replaceable"><code>hours</code></em>
<em class="replaceable"><code>days</code></em>
<em class="replaceable"><code>months</code></em>
<em class="replaceable"><code>days_of_week</code></em>
<em class="replaceable"><code>target</code></em>
</p></div></div><div class="refsect1"><a id="HouseKeepingCron_description"></a><h2>DESCRIPTION</h2><p><code class="option">HouseKeepingCron</code> is an <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>-equivalent of the usual Unix "cron"
(periodic execution) facility.
</p><p>
Time specifications (first six fields) behave exactly like
with the traditional Vixie cron.
That includes numbers, ranges and '<code class="literal">*</code>';
see <span class="citerefentry"><span class="refentrytitle">crontab</span>(5)</span> manual page.
Additional features are provided by the <code class="classname">Set::Crontab</code>
<a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> module:
The '<code class="literal"><<em class="replaceable"><code>N</code></em></code>' and
'<code class="literal">><em class="replaceable"><code>N</code></em></code>' select
elements smaller and larger than <em class="replaceable"><code>N</code></em>.
<code class="literal">!<em class="replaceable"><code>N</code></em></code> excludes
<em class="replaceable"><code>N</code></em> from the set. "<code class="literal">!3</code>"
with a range of "<code class="literal">1-10</code>" corresponds to
"<code class="literal">1-2,4-10</code>", and "<code class="literal">>3,!7</code>"
in the same range means "<code class="literal">4-6,8-10</code>".
</p><p>
Target specification, provided in form of everything after the 6th field,
consists of the catalog name and action. Catalog name can be prefixed
with <code class="literal">></code>, <code class="literal"><</code> and
<code class="literal">=</code>.
Name prepended with '<code class="literal">></code>' will make the
commands run <span class="bold"><strong>after</strong></span> the
reconfig/restart/jobs/pid management cycle (usually they run before).
</p><p>
Interchange-specific things you can run include
everything you can put into execution over
<code class="function">Vend::Dispatch::run_macro</code> function.
That means <code class="option">GlobalSub</code>s, <code class="option">Sub</code>s and anything
else that is suitable for interpolation (all <a href="glossary.html#ITL" class="olink">ITL</a> code).
</p><p>
Bear in mind, though, that there is no catalog context; everything is
executing on the global level.
</p><p>
In addition to the above, two special targets exist,
<code class="literal">:reconfig</code> and <code class="literal">:jobs</code>.
They define the intervals for processing
catalog reconfiguration and batch job requests.
The <code class="filename">reconfig</code> and
<code class="filename">jobsqueue</code> files in <code class="option">RunDir</code> are ignored
if <code class="option">HouseKeepingCron</code> is specified and these targets not included.
In that case, a warning will be issued because, without the two
entries, catalog reconfiguration or job execution requests are
ignored — something you almost never want in regular operation.
</p></div><div class="refsect1"><a id="HouseKeepingCron_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="HouseKeepingCron_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Running__restart_and__jobs_every_5_minutes_2955"></a><p class="title"><strong>Example: Running :restart and :jobs every 5 minutes</strong></p><div class="example-contents"><p>The basic entry to implement <code class="literal">HouseKeeping 300</code>
would be:</p><pre class="programlisting">
HouseKeeping 1 minute
HouseKeepingCron <<EOC
*/5 * * * * * :restart
*/5 * * * * * :jobs
EOC
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Running_batch_jobs_2956"></a><p class="title"><strong>Example: Running batch jobs</strong></p><div class="example-contents"><pre class="programlisting">
HouseKeepingCron <<EOC
0 0 * * * * =standard hourly
0 1 2 * * * =standard daily
0 2 4 * * 7 =standard weekly
0 0 3 1 * * =standard monthly
EOC
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Warning_message_when__reconfig_entry_is_not_present_2957"></a><p class="title"><strong>Example: Warning message when :reconfig entry is not present</strong></p><div class="example-contents"><p>The warning message would look like this:</p><pre class="programlisting">
WARNING: suggested cron entry ':reconfig' not present.
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="HouseKeepingCron_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="HouseKeepingCron_availability"></a><h2>AVAILABILITY</h2><p>HouseKeepingCron is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="HouseKeepingCron_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_459_12098"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 459</strong></p><div class="figure-contents"><pre class="screen">
['HouseKeepingCron', 'cron', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4102__context_shows_lines_4102_4117__12099"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4102 (context shows lines 4102-4117)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_cron {
my($var, $value) = @_;
return '' unless $value =~ /\s/ and $value =~ /[a-zA-Z]/;
unless($Vend::Cron::Loaded) {
config_warn(
"Cannot use %s unless %s module loaded%s",
'crontab',
'Vend::Cron',
' (missing Set::Crontab?)',
);
return '';
}
return Vend::Cron::read_cron($value);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="HouseKeepingCron_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="HouseKeepingCron_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RunDir" title="RunDir"><span class="citerefentry"><span class="refentrytitle">RunDir</span>(7ic)</span></a>, <a class="link" href="#HouseKeeping" title="HouseKeeping"><span class="citerefentry"><span class="refentrytitle">HouseKeeping</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="IPCsocket"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>IPCsocket — specify IPC socket filename
</p></div><div class="refsect1"><a id="IPCsocket_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="IPCsocket_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the filename IC; should create to enable
IPC socket communication. The filename must be writable
by the Interchange daemon.
</p></div><div class="refsect1"><a id="IPCsocket_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="IPCsocket_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_IPCsocket_3286"></a><p class="title"><strong>Example: Setting IPCsocket</strong></p><div class="example-contents"><pre class="programlisting">
IPCsocket /var/run/interchange/interchange.sock.ipc
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="IPCsocket_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="IPCsocket_availability"></a><h2>AVAILABILITY</h2><p>IPCsocket is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="IPCsocket_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_457_12185"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 457</strong></p><div class="figure-contents"><pre class="screen">
['IPCsocket', 'root_dir', 'etc/socket.ipc'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3898__context_shows_lines_3898_3905__12186"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3898 (context shows lines 3898-3905)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir {
my($var, $value) = @_;
return '' unless $value;
$value = "$Global::VendRoot/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="IPCsocket_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="IPCsocket_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#SocketFile" title="SocketFile"><span class="citerefentry"><span class="refentrytitle">SocketFile</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ImageAlias"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ImageAlias — specify alias location for all image files
</p></div><div class="refsect1"><a id="ImageAlias_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>alias_location</code></em> <em class="replaceable"><code>real_location</code></em> </p></div></div><div class="refsect1"><a id="ImageAlias_description"></a><h2>DESCRIPTION</h2><p>The directive specifies an alias for the base images location, which is
set by <code class="option">ImageDir</code> and related directives.
</p><p>
It is similar in effect to the "alias" feature of Web servers such as
<a class="ulink" href="http://www.apache.org/" target="_top">Apache</a> or NCSA, and applies to <code class="literal"><body background=</code>,
table elements <code class="literal">background=</code> and all
<code class="literal">src=</code> specifications.
</p></div><div class="refsect1"><a id="ImageAlias_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ImageAlias_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ImageAlias_4103"></a><p class="title"><strong>Example: Setting ImageAlias</strong></p><div class="example-contents"><pre class="programlisting">
ImageAlias /images/ /tutorial/tutorial-images/
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ImageAlias_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ImageAlias_availability"></a><h2>AVAILABILITY</h2><p>ImageAlias is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ImageAlias_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_621_12395"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 621</strong></p><div class="figure-contents"><pre class="screen">
['ImageAlias', 'hash', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12396"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ImageAlias_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ImageAlias_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ImageDirSecure" title="ImageDirSecure"><span class="citerefentry"><span class="refentrytitle">ImageDirSecure</span>(7ic)</span></a>, <a href="pragmas.html#no_image_rewrite" class="olink"><span class="citerefentry"><span class="refentrytitle">no_image_rewrite</span>(7ic)</span></a>, <a class="link" href="#ImageDir" title="ImageDir"><span class="citerefentry"><span class="refentrytitle">ImageDir</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ImageDir"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ImageDir — specify base location for all image files
</p></div><div class="refsect1"><a id="ImageDir_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>location</code></em> </p></div></div><div class="refsect1"><a id="ImageDir_description"></a><h2>DESCRIPTION</h2><p><code class="option">ImageDir</code> is one of quite basic settings in every <code class="filename">catalog.cfg</code>.
</p><p>
The directive specifies a base location, accessible over the web,
where <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> should look for image files, when just relative image
filename is given.
Automatically "translated" are image locations mentioned
in
<img src="">, <input src="">, <body background="">, <table background=""> and table subelements (<th>, <tr> and <td>).
</p><p>
A setting of <code class="option">ImageDir</code> <code class="literal">/images/</code> and a specification
of <code class="literal"><img src="test/test.png"></code> would be
translated to <code class="literal"><img src="/images/test/test.png"></code>.
</p></div><div class="refsect1"><a id="ImageDir_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ImageDir_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ImageDir_3827"></a><p class="title"><strong>Example: Setting ImageDir</strong></p><div class="example-contents"><pre class="programlisting">
ImageDir /images/
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_ImageDir_using_full_URL_specification_3828"></a><p class="title"><strong>Example: Setting ImageDir using full URL specification</strong></p><div class="example-contents"><pre class="programlisting">
ImageDir http://images.mydomain.local/images/
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ImageDir_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ImageDir_availability"></a><h2>AVAILABILITY</h2><p>ImageDir is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ImageDir_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_626_12335"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 626</strong></p><div class="figure-contents"><pre class="screen">
['ImageDir', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ImageDir_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ImageDir_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ImageDirSecure" title="ImageDirSecure"><span class="citerefentry"><span class="refentrytitle">ImageDirSecure</span>(7ic)</span></a>, <a href="pragmas.html#no_image_rewrite" class="olink"><span class="citerefentry"><span class="refentrytitle">no_image_rewrite</span>(7ic)</span></a>, <a class="link" href="#ImageAlias" title="ImageAlias"><span class="citerefentry"><span class="refentrytitle">ImageAlias</span>(7ic)</span></a>, <a class="link" href="#VendURL" title="VendURL"><span class="citerefentry"><span class="refentrytitle">VendURL</span>(7ic)</span></a>, <a class="link" href="#SecureURL" title="SecureURL"><span class="citerefentry"><span class="refentrytitle">SecureURL</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ImageDirInternal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ImageDirInternal — (obsolete)
</p></div><div class="refsect1"><a id="ImageDirInternal_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="ImageDirInternal_description"></a><h2>DESCRIPTION</h2><p>The directive actually specifies value of <code class="option">ImageDir</code> directive, for cases
when <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>'s internal HTTP server is in use.
</p><p>
It must have a trailing <code class="literal">/</code> to work, and should always begin
with a fully-qualified path (<code class="literal">http://</code>).
</p></div><div class="refsect1"><a id="ImageDirInternal_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p></p></div><div class="refsect1"><a id="ImageDirInternal_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_ImageDirInternal_3631"></a><p class="title"><strong>Example: Specifying ImageDirInternal</strong></p><div class="example-contents"><p>ImageDirInternal http://myhost.mydomain.local/images/
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="ImageDirInternal_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ImageDirInternal_availability"></a><h2>AVAILABILITY</h2><p>ImageDirInternal is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ImageDirInternal_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_625_12290"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 625</strong></p><div class="figure-contents"><pre class="screen">
['ImageDirInternal', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ImageDirInternal_authors"></a><h2>AUTHORS</h2><p></p></div><div class="refsect1"><a id="ImageDirInternal_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ImageDirSecure"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ImageDirSecure — specify base location for all IMG and INPUT src= files served over HTTPS
</p></div><div class="refsect1"><a id="ImageDirSecure_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>location</code></em> </p></div></div><div class="refsect1"><a id="ImageDirSecure_description"></a><h2>DESCRIPTION</h2><p>The directive specifies a base location, accessible over the web,
where <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> should look for IMG and INPUT <a href="glossary.html#HTML" class="olink">HTML</a>
<code class="literal">src=</code> file specifications,
<span class="bold"><strong>when the originating page is being served
over a secure connection (HTTPS)</strong></span>.
This setting applies to image locations mentioned in <img src="">, <input src="">, <body background="">, <table background=""> and table subelements (<th>, <tr> and <td>).
</p><p>
This is useful if you are using separate HTTPS and HTTP servers, and cannot
make the image directory paths match. If <code class="option">ImageDirSecure</code> is
unspecified, it defaults to <code class="option">ImageDir</code>.
</p></div><div class="refsect1"><a id="ImageDirSecure_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ImageDirSecure_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ImageDirSecure_4638"></a><p class="title"><strong>Example: Setting ImageDirSecure</strong></p><div class="example-contents"><pre class="programlisting">
ImageDir /images.ssl/
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ImageDirSecure_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ImageDirSecure_availability"></a><h2>AVAILABILITY</h2><p>ImageDirSecure is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ImageDirSecure_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_624_12531"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 624</strong></p><div class="figure-contents"><pre class="screen">
['ImageDirSecure', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ImageDirSecure_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ImageDirSecure_seeAlso"></a><h2>SEE ALSO</h2><p><a href="pragmas.html#no_image_rewrite" class="olink"><span class="citerefentry"><span class="refentrytitle">no_image_rewrite</span>(7ic)</span></a>, <a class="link" href="#ImageAlias" title="ImageAlias"><span class="citerefentry"><span class="refentrytitle">ImageAlias</span>(7ic)</span></a>, <a class="link" href="#VendURL" title="VendURL"><span class="citerefentry"><span class="refentrytitle">VendURL</span>(7ic)</span></a>, <a class="link" href="#SecureURL" title="SecureURL"><span class="citerefentry"><span class="refentrytitle">SecureURL</span>(7ic)</span></a>, <a class="link" href="#ImageDir" title="ImageDir"><span class="citerefentry"><span class="refentrytitle">ImageDir</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Inet_Mode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Inet_Mode — specify whether Interchange server should open an INET socket and listen on a port
</p></div><div class="refsect1"><a id="Inet_Mode_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="Inet_Mode_description"></a><h2>DESCRIPTION</h2><p>Specify whether the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server should open an INET-domain socket and
listen on some port (<code class="literal">7786</code> by default). The port can be
changed with the <code class="option">TcpMap</code> directive.
</p><p>
This <a href="glossary.html#configuration" class="olink">configuration</a> directive can be overridden using
<code class="literal">interchange -i</code> switch on the command line.
</p><p>
</p></div><div class="refsect1"><a id="Inet_Mode_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="Inet_Mode_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_Inet_Mode_2615"></a><p class="title"><strong>Example: Enabling Inet_Mode</strong></p><div class="example-contents"><pre class="programlisting">
Inet_Mode Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Inet_Mode_notes"></a><h2>NOTES</h2><p>In general, you will need <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> INET mode when the
Web and <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server are not the same machine.
</p><p>
The default port number, <code class="literal">7786</code>, was chosen since it
represents the ASCII numbers of letters <code class="literal">M</code> and
<code class="literal">V</code>. (<a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> was once called MiniVend).
</p></div><div class="refsect1"><a id="Inet_Mode_availability"></a><h2>AVAILABILITY</h2><p>Inet_Mode is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Inet_Mode_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_415__context_shows_lines_405_410__12007"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 415 (context shows lines 405-410)</strong></p><div class="figure-contents"><pre class="screen">
['Inet_Mode', 'yesno', (
defined $Global::Inet_Mode
||
defined $Global::Unix_Mode
)
? ($Global::Inet_Mode || 0) : 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12008"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Inet_Mode_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Inet_Mode_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Unix_Mode" title="Unix_Mode"><span class="citerefentry"><span class="refentrytitle">Unix_Mode</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="IpHead"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>IpHead — use only part of the IP to qualify user sessions
</p></div><div class="refsect1"><a id="IpHead_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="IpHead_description"></a><h2>DESCRIPTION</h2><p>The directive affects the domain/IP session qualifying method. When enabled,
only the first <code class="option">IpQuad</code> dot-quads of the IP address are used to qualify
the user session (along with, of course, the session ID).
</p><p>
This is a slight compromise on security, but it allows
non-cookie-accepting browsers, like AOL's V2.0, to use multiple proxy
servers.
</p></div><div class="refsect1"><a id="IpHead_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="IpHead_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_IpHead_3166"></a><p class="title"><strong>Example: Enabling IpHead</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
DomainTail No
IpHead Yes
IpQuad 3
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="IpHead_notes"></a><h2>NOTES</h2><p><code class="option">DomainTail</code> is preferable unless one of your HTTP servers does not do
host name lookups.
</p></div><div class="refsect1"><a id="IpHead_availability"></a><h2>AVAILABILITY</h2><p>IpHead is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="IpHead_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_474_12150"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 474</strong></p><div class="figure-contents"><pre class="screen">
['IpHead', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12151"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="IpHead_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="IpHead_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#WideOpen" title="WideOpen"><span class="citerefentry"><span class="refentrytitle">WideOpen</span>(7ic)</span></a>, <a class="link" href="#CountrySubdomains" title="CountrySubdomains"><span class="citerefentry"><span class="refentrytitle">CountrySubdomains</span>(7ic)</span></a>, <a class="link" href="#IpQuad" title="IpQuad"><span class="citerefentry"><span class="refentrytitle">IpQuad</span>(7ic)</span></a>, <a class="link" href="#DomainTail" title="DomainTail"><span class="citerefentry"><span class="refentrytitle">DomainTail</span>(7ic)</span></a>, <a class="link" href="#TrustProxy" title="TrustProxy"><span class="citerefentry"><span class="refentrytitle">TrustProxy</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="IpQuad"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>IpQuad — specify number of dot-quads to honor when IpHead is enabled
</p></div><div class="refsect1"><a id="IpQuad_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>number</code></em> </p></div></div><div class="refsect1"><a id="IpQuad_description"></a><h2>DESCRIPTION</h2><p>The directive simply specifies the number of <span class="emphasis"><em>dot-quads</em></span>
the session qualifier will look at, if <code class="option">IpHead</code> is enabled.
</p><p>
In other words, with an IPv4 address (32 bit address, consisting of
four dot-quads) of value
<code class="systemitem">127.0.0.1</code> and <code class="option">IpQuad</code> of
<code class="literal">3</code>,
<code class="systemitem"><span class="bold"><strong>127.0.0.</strong></span></code>
would be enough to qualify the user session.
</p></div><div class="refsect1"><a id="IpQuad_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="IpQuad_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_IpQuad_2856"></a><p class="title"><strong>Example: Setting IpQuad</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
DomainTail No
IpHead Yes
IpQuad 3
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="IpQuad_notes"></a><h2>NOTES</h2><p><code class="option">DomainTail</code> is preferable unless one of your HTTP servers does not do
host name lookups.
</p></div><div class="refsect1"><a id="IpQuad_availability"></a><h2>AVAILABILITY</h2><p>IpQuad is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="IpQuad_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_475_12074"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 475</strong></p><div class="figure-contents"><pre class="screen">
['IpQuad', 'integer', '1'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3965__context_shows_lines_3965_3972__12075"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3965 (context shows lines 3965-3972)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_integer {
my($var, $value) = @_;
$value = hex($value) if $value =~ /^0x[\dA-Fa-f]+$/;
$value = oct($value) if $value =~ /^0[0-7]+$/;
config_error("The $var directive (now set to '$value') must be an integer\n")
unless $value =~ /^\d+$/;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="IpQuad_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="IpQuad_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#WideOpen" title="WideOpen"><span class="citerefentry"><span class="refentrytitle">WideOpen</span>(7ic)</span></a>, <a class="link" href="#IpHead" title="IpHead"><span class="citerefentry"><span class="refentrytitle">IpHead</span>(7ic)</span></a>, <a class="link" href="#CountrySubdomains" title="CountrySubdomains"><span class="citerefentry"><span class="refentrytitle">CountrySubdomains</span>(7ic)</span></a>, <a class="link" href="#DomainTail" title="DomainTail"><span class="citerefentry"><span class="refentrytitle">DomainTail</span>(7ic)</span></a>, <a class="link" href="#TrustProxy" title="TrustProxy"><span class="citerefentry"><span class="refentrytitle">TrustProxy</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ItemAction"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ItemAction — specify subroutine to invoke when users' electronic cart contents change
</p></div><div class="refsect1"><a id="ItemAction_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>subroutine_name</code></em> </p></div></div><div class="refsect1"><a id="ItemAction_description"></a><h2>DESCRIPTION</h2><p>The directive specifies name of the <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> subroutine to be invoked
when users' electronic <a href="glossary.html#cart" class="olink">cart</a> contents change. The subroutine can
be defined on both global and catalog level.
</p><p>
The subroutine executes whenever the contents of users' cart are changed via
the standard means available through the <a href="glossary.html#CGI" class="olink">CGI</a> variable space.
</p><p>
The subroutine will be executed per-change, such that any page process
resulting in multiple alterations to the cart will potentially call this
function multiple times.
</p><p>
The specified function is invoked with the reference to the cart item
in question. The function's return value is not used.
</p></div><div class="refsect1"><a id="ItemAction_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ItemAction_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_ItemAction_4631"></a><p class="title"><strong>Example: Specifying ItemAction</strong></p><div class="example-contents"><pre class="programlisting">
ItemAction cart_item_update
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ItemAction_notes"></a><h2>NOTES</h2><p>It must be noted that the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> cart subsystem is based on arrayrefs of hashrefs
(all <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> programming terms) — there is no object encapsulation for
limiting or monitoring program access to the contents of any cart.
Consequently, direct manipulation of the <a href="glossary.html#cart" class="olink">cart</a> from within <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a>
<span class="bold"><strong>will not</strong></span> cause this function to be invoked. The
triggers only fire when the cart contents are modified through the standard
Interchange <a href="glossary.html#CGI" class="olink">CGI</a>-based variable processing. Therefore, it is assumed
that any programmer sufficiently comfortable or
confident to manipulate cart contents directly can also be given the
responsibility of deciding whether or not it is appropriate to manually invoke
this function.
</p><p>
This <a href="glossary.html#configuration" class="olink">configuration</a> directive is very similar to <code class="option">CartTrigger</code>
and <code class="option">CartTriggerQuantity</code>, the two more recent and flexible options.
</p></div><div class="refsect1"><a id="ItemAction_availability"></a><h2>AVAILABILITY</h2><p>ItemAction is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ItemAction_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_538_12529"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 538</strong></p><div class="figure-contents"><pre class="screen">
['ItemAction', 'action', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2152__context_shows_lines_2152_2249__12530"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2152 (context shows lines 2152-2249)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_action {
my ($var, $value, $mapped) = @_;
if (! $value) {
return $InitializeEmpty{$var} ? '' : {};
}
return if $Vend::ExternalProgram;
my $c;
if($mapped) {
$c = $mapped;
}
elsif(defined $C) {
$c = $C->{$var} ||= {};
}
else {
no strict 'refs';
$c = ${"Global::$var"} ||= {};
}
if (defined $C and ! $c->{_mvsafe}) {
my $calc = Vend::Interpolate::reset_calc();
$c->{_mvsafe} = $calc;
}
my ($name, $sub) = split /\s+/, $value, 2;
$name =~ s/-/_/g;
## Determine if we are in a catalog config, and if
## perl should be global and/or strict
my $nostrict;
my $perlglobal = 1;
if($C) {
$nostrict = $Global::PerlNoStrict->{$C->{CatalogName}};
$perlglobal = $Global::AllowGlobal->{$C->{CatalogName}};
}
# Untaint and strip this pup
$sub =~ s/^\s*((?s:.)*\S)\s*//;
$sub = $1;
if($sub !~ /\s/) {
no strict 'refs';
if($sub =~ /::/ and ! $C) {
$c->{$name} = \&{"$sub"};
}
else {
if($C and $C->{Sub}) {
$c->{$name} = $C->{Sub}{$sub};
}
if(! $c->{$name} and $Global::GlobalSub) {
$c->{$name} = $Global::GlobalSub->{$sub};
}
}
if(! $c->{$name} and $AllowScalarAction{$var}) {
$c->{$name} = $sub;
}
elsif(! $c->{$name}) {
$@ = errmsg("Mapped %s action routine '%s' is non-existent.", $var, $sub);
}
}
elsif ( ! $mapped and $sub !~ /^sub\b/) {
if($AllowScalarAction{$var}) {
$c->{$name} = $sub;
}
else {
my $code = <<EOF;
sub {
return Vend::Interpolate::interpolate_html(<<EndOfThisHaiRYTHING);
$sub
EndOfThisHaiRYTHING
}
EOF
$c->{$name} = eval $code;
}
}
elsif ($perlglobal) {
package Vend::Interpolate;
if($nostrict) {
no strict;
$c->{$name} = eval $sub;
}
else {
$c->{$name} = eval $sub;
}
}
else {
package Vend::Interpolate;
$c->{$name} = $c->{_mvsafe}->reval($sub);
}
if($@) {
config_warn("Action '%s' did not compile correctly (%s).", $name, $@);
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ItemAction_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ItemAction_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CartTriggerQuantity" title="CartTriggerQuantity"><span class="citerefentry"><span class="refentrytitle">CartTriggerQuantity</span>(7ic)</span></a>, <a class="link" href="#CartTrigger" title="CartTrigger"><span class="citerefentry"><span class="refentrytitle">CartTrigger</span>(7ic)</span></a>, <a class="link" href="#CodeDef" title="CodeDef"><span class="citerefentry"><span class="refentrytitle">CodeDef</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Jobs"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Jobs — define parameters for batch jobs
</p></div><div class="refsect1"><a id="Jobs_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>key</code></em>
<em class="replaceable"><code>value</code></em>
... </p></div></div><div class="refsect1"><a id="Jobs_description"></a><h2>DESCRIPTION</h2><p></p><p>
This directive configures Interchange batch <a href="glossary.html#jobs" class="olink">jobs</a> facility.
For detailed discussion, please see the <a href="glossary.html#jobs" class="olink">jobs</a> glossary entry.
</p><p>
The directive accepts a list of key/value pair and
can be specified at both global and <a href="glossary.html#catalog" class="olink">catalog</a> level.
</p><p>
The available keys for the <span class="bold"><strong>global directive</strong></span>
are:
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Key</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">MaxLifetime</code></td><td><code class="literal">600</code></td><td>The maximum time in seconds that a job will be allowed to run</td></tr><tr><td><code class="literal">MaxServers</code></td><td><code class="literal">1</code></td><td>The maximum number of servers processing jobs. Excess jobs will be queued
</td></tr><tr><td><code class="literal">UseGlobal</code></td><td><code class="literal">false</code></td><td>Always search for global job definitions?
</td></tr></tbody></table></div><p>
</p><p>
The available keys for the <span class="bold"><strong>catalog directive</strong></span> are:
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Key</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">add_session</code></td><td><code class="literal">false</code></td><td>Add session dump to
<a href="glossary.html#JobOutput" class="olink">job output</a>?</td></tr><tr><td><code class="literal">autoend</code></td><td>None</td><td>
A macro to execute after each invidiual file in the job
</td></tr><tr><td><code class="literal">autoload</code></td><td>None</td><td>
A macro to execute before each invidiual file in the job
</td></tr><tr><td><code class="literal">base_directory</code></td><td><code class="literal">etc/jobs</code></td><td><a href="glossary.html#JobDirectories" class="olink">Directory</a>
to search for batch jobs.</td></tr><tr><td><code class="literal">email</code></td><td>None</td><td>Email <a href="glossary.html#JobOutput" class="olink">job output</a>
to this address</td></tr><tr><td><code class="literal">extra_headers</code></td><td>None</td><td>Additional email headers</td></tr><tr><td><code class="literal">from</code></td><td><code class="option">MailOrderTo</code></td><td>"From" address in emails</td></tr><tr><td><code class="literal">ignore_errors</code></td><td><code class="literal">false</code></td><td>Excludes fatal errors from
<a href="glossary.html#JobOutput" class="olink">job output</a>
</td></tr><tr><td><code class="literal">filter</code></td><td> </td><td>Filters applied to
<a href="glossary.html#JobOutput" class="olink">job output</a></td></tr><tr><td><code class="literal">initialize</code></td><td>None</td><td>
A macro executed before the job commences
</td></tr><tr><td><code class="literal">log</code></td><td>None</td><td>Write <a href="glossary.html#JobOutput" class="olink">job output</a>
to this logfile</td></tr><tr><td><code class="literal">subject</code></td><td><code class="literal">Interchange results for job: %s</code></td><td>Subject for emails, including placeholder for job name</td></tr><tr><td><code class="literal">suffix</code></td><td>None</td><td>Restrict job to files matching the specified suffix</td></tr><tr><td><code class="literal">trackdb</code></td><td>None</td><td>Table for <a href="glossary.html#JobTracking" class="olink">tracking jobs</a></td></tr><tr><td><code class="literal">use_global</code></td><td><code class="literal">false</code></td><td>Search for global job definitions?</td></tr></tbody></table></div><p>
</p><p>
For more information about Interchange batch jobs see <a href="glossary.html#jobs" class="olink">jobs</a> glossary
entry.
</p><p>
</p></div><div class="refsect1"><a id="Jobs_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="Jobs_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Define_catalog_level_Jobs_directive_2706"></a><p class="title"><strong>Example: Define catalog-level Jobs directive</strong></p><div class="example-contents"><pre class="programlisting">
Jobs <<EOJ
log logs/jobs.log
base_directory jobs
email root@myhost.mydomain.local
EOJ
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Run_jobs_manually_2707"></a><p class="title"><strong>Example: Run jobs manually</strong></p><div class="example-contents"><p>Invoke from the command line:</p><pre class="programlisting">
su -c '/PATH/TO/interchange --quiet --runjobs=CATALOG_NAME=DIRECTORY_NAME' USERNAME
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Run_jobs_automatically_from_Unix_crontab_2708"></a><p class="title"><strong>Example: Run jobs automatically from Unix crontab</strong></p><div class="example-contents"><pre class="programlisting">
12 2 * * * su -c '/PATH/TO/interchange --quiet --runjobs=CATALOG_NAME=DIRECTORY_NAME' USERNAME
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Jobs_notes"></a><h2>NOTES</h2><p>Files in the jobs directory that end in <code class="option">HTMLsuffix</code> will be silently ignored.
</p><p>
The invocation of jobs from the command line will only queue them for execution
and will return the shell prompt before the jobs have actually started
executing.
</p><p>
In that case, a common temporary <a href="glossary.html#session" class="olink">session</a> (<code class="mv">mv_tmp_session</code> == <a href="glossary.html#true" class="olink">true</a>)
will be created for use by all of the files
in the job queue. The session will be closed when the jobs complete.
The remote IP address will be set to <code class="literal">none</code> and the
user agent string will be set to <code class="literal">commandline</code>.
</p></div><div class="refsect1"><a id="Jobs_availability"></a><h2>AVAILABILITY</h2><p>Jobs is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Jobs_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_456_12033"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 456</strong></p><div class="figure-contents"><pre class="screen">
['Jobs', 'hash', 'MaxLifetime 600 MaxServers 1 UseGlobal 0'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_702_12034"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 702</strong></p><div class="figure-contents"><pre class="screen">
['Jobs', 'hash', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12035"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Jobs_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Jobs_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Levies"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Levies — specify levy sections to apply
</p></div><div class="refsect1"><a id="Levies_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>levy_name</code></em>... </p></div></div><div class="refsect1"><a id="Levies_description"></a><h2>DESCRIPTION</h2><p>Specify <code class="option">Levy</code> sections that are to be applied.
</p></div><div class="refsect1"><a id="Levies_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Levies_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_Levies_3906"></a><p class="title"><strong>Example: Defining Levies</strong></p><div class="example-contents"><pre class="programlisting">
Levy salestax description "Sales Tax (%s)"
Levy salestax keep_if_zero 1
Levy salestax type salestax
Levy salestax sort 002
Levy shipping keep_if_zero 0
Levy shipping type shipping
Levy shipping mode_variable mv_shipmode
Levy shipping mode USPS
Levies salestax shipping
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Levies_notes"></a><h2>NOTES</h2><p>See the <a href="glossary.html#levy" class="olink">levy</a> glossary entry for a complete discussion.
</p></div><div class="refsect1"><a id="Levies_availability"></a><h2>AVAILABILITY</h2><p>Levies is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Levies_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_705_12353"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 705</strong></p><div class="figure-contents"><pre class="screen">
['Levies', 'array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3755__context_shows_lines_3755_3775__12354"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3755 (context shows lines 3755-3775)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_array {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || [];
}
else {
no strict 'refs';
$c = ${"Global::$item"} || [];
}
for (@setting) {
check_legal($item, $_);
push @{$c}, $_;
}
$c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Levies_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Levies_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#levy-list" class="olink"><span class="citerefentry"><span class="refentrytitle">levy-list</span>(7ic)</span></a>, <a class="link" href="#Levy" title="Levy"><span class="citerefentry"><span class="refentrytitle">Levy</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Levy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Levy — define levy section (levy key)
</p></div><div class="refsect1"><a id="Levy_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="Levy_description"></a><h2>DESCRIPTION</h2><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<code class="literal">add_to</code> -
</p></li><li class="listitem"><p>
<code class="literal">check_status</code> -
</p></li><li class="listitem"><p>
<code class="literal">description</code> -
</p></li><li class="listitem"><p>
<code class="literal">exclude_if</code> -
</p></li><li class="listitem"><p>
<code class="literal">include_if</code> -
</p></li><li class="listitem"><p>
<code class="literal">free_message</code> -
</p></li><li class="listitem"><p>
<code class="literal">keep_if_zero</code> -
</p></li><li class="listitem"><p>
<code class="literal">label_value</code> -
</p></li><li class="listitem"><p>
<code class="literal">mode</code> -
</p></li><li class="listitem"><p>
<code class="literal">mode_from_scratch</code> -
</p></li><li class="listitem"><p>
<code class="literal">mode_from_values</code> -
</p></li><li class="listitem"><p>
<code class="literal">multi</code> -
</p></li><li class="listitem"><p>
<code class="literal">part_number</code> -
</p></li><li class="listitem"><p>
<code class="literal">sort</code> -
</p></li><li class="listitem"><p>
<code class="literal">tax_fields</code> -
</p></li><li class="listitem"><p>
<code class="literal">tax_type</code> -
</p></li><li class="listitem"><p>
<code class="literal">type</code> -
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="Levy_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Levy_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_a_Levy_4110"></a><p class="title"><strong>Example: Defining a Levy</strong></p><div class="example-contents"><pre class="programlisting">
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Levy_notes"></a><h2>NOTES</h2><p>See the <a href="glossary.html#levy" class="olink">levy</a> glossary entry for a complete discussion.
</p></div><div class="refsect1"><a id="Levy_availability"></a><h2>AVAILABILITY</h2><p>Levy is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Levy_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_706_12397"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 706</strong></p><div class="figure-contents"><pre class="screen">
['Levy', 'locale', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3060__context_shows_lines_3060_3124__12398"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3060 (context shows lines 3060-3124)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_locale {
my($item,$settings) = @_;
return ($settings || '') unless $settings =~ /[^\d.]/;
$settings = '' if "\L$settings" eq 'default';
my $name;
my ($c, $store);
if(defined $C) {
$c = $C->{$item} || { };
$C->{$item . "_repository"} = {}
unless $C->{$item . "_repository"};
$store = $C->{$item . "_repository"};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
${"Global::$item" . "_repository"} = {}
unless ${"Global::$item" . "_repository"};
$store = ${"Global::$item" . "_repository"};
}
my ($eval, $safe);
if ($settings =~ s/^\s*([-\w.@]+)(?:\s+)?//) {
$name = $1;
undef $eval;
$settings =~ /^\s*{/
and $settings =~ /}\s*$/
and $eval = 1;
$eval and ! $safe and $safe = new Vend::Safe;
if(! defined $store->{$name} and $item eq 'Locale') {
my $past = POSIX::setlocale(POSIX::LC_ALL);
if(POSIX::setlocale(POSIX::LC_ALL, $name) ) {
$store->{$name} = POSIX::localeconv();
}
POSIX::setlocale(POSIX::LC_ALL, $past);
}
my($sethash);
if ($eval) {
$sethash = $safe->reval($settings)
or config_warn("bad Locale setting in %s: %s", $name, $@),
$sethash = {};
}
else {
$settings =~ s/^\s+//;
$settings =~ s/\s+$//;
$sethash = {};
%{$sethash} = Text::ParseWords::shellwords($settings);
}
$c = $store->{$name} || {};
my $nodefaults = delete $sethash->{MV_LOCALE_NO_DEFAULTS};
for (keys %{$sethash}) {
$c->{$_} = $sethash->{$_};
}
}
else {
config_error("Bad locale setting $settings.\n");
}
$C->{LastLocale} = $name if $C and $item eq 'Locale';
$store->{$name} = $c unless $store->{$name};
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Levy_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Levy_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#levy-list" class="olink"><span class="citerefentry"><span class="refentrytitle">levy-list</span>(7ic)</span></a>, <a class="link" href="#Levies" title="Levies"><span class="citerefentry"><span class="refentrytitle">Levies</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Limit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Limit — set or modify various limits
</p></div><div class="refsect1"><a id="Limit_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="Limit_description"></a><h2>DESCRIPTION</h2><div class="table"><a id="idp10822544"></a><p class="title"><strong>Table 1. </strong></p><div class="table-contents"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Name</th><th>Default</th><th>Overview</th></tr></thead><tbody><tr><td>cart_quantity_per_line</td><td>none</td><td>maximum quantity per item in cart</td></tr><tr><td>chained_cost_levels</td><td>32</td><td> </td></tr><tr><td>dbm_open_retries</td><td>10</td><td>number of retries opening DBM file</td></tr><tr><td>file_lock_retries</td><td>5</td><td>number of retries on file locking</td></tr><tr><td>ip_session_expire</td><td>60 minutes</td><td>see <code class="option">RobotLimit</code></td></tr><tr><td>no_ship_message</td><td> </td><td> </td></tr><tr><td>list_text_overflow</td><td> </td><td> </td></tr><tr><td>list_text_size</td><td>-</td><td>maximum length of text in lists</td></tr><tr><td>lockout_reset_seconds</td><td>30</td><td>see <code class="option">RobotLimit</code></td></tr><tr><td>logdata_error_length</td><td>-</td><td> </td></tr><tr><td>option_list</td><td>5000</td><td> </td></tr><tr><td>override_tag</td><td> </td><td> </td></tr><tr><td>robot_expire</td><td>1 day</td><td>see <code class="option">RobotLimit</code></td></tr><tr><td>session_id_length</td><td>8</td><td>length of session identifier, see <a href="glossary.html#session" class="olink">session</a></td></tr></tbody></table></div></div><p><br class="table-break" />
</p></div><div class="refsect1"><a id="Limit_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Limit_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example__4612"></a><p class="title"><strong>Example: </strong></p><div class="example-contents"><pre class="programlisting">
Limit robot_expire 0.01
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Limit_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Limit_availability"></a><h2>AVAILABILITY</h2><p>Limit is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Limit_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_553_12525"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 553</strong></p><div class="figure-contents"><pre class="screen">
['Limit', 'hash', 'option_list 5000 chained_cost_levels 32 robot_expire 1'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12526"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Limit_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Limit_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CookiePattern" title="CookiePattern"><span class="citerefentry"><span class="refentrytitle">CookiePattern</span>(7ic)</span></a>, <a class="link" href="#RobotLimit" title="RobotLimit"><span class="citerefentry"><span class="refentrytitle">RobotLimit</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Locale"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Locale — specify locale definitions
</p></div><div class="refsect1"><a id="Locale_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>locale_key</code></em> <em class="replaceable"><code>locale_value</code></em>... <br /></p></div></div><div class="refsect1"><a id="Locale_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the default <a href="glossary.html#locale" class="olink">locale</a> definitions for
a number of items:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<code class="literal">currency_symbol</code> - default currency symbol. Can be a simple value like "<code class="literal">$</code>" or " <code class="literal">E</code>", or a more flexible setting such as '<code class="literal"><img src="euro.png" /></code>'.
</p></li><li class="listitem"><p>
<code class="literal">frac_digits</code> -
</p></li><li class="listitem"><p>
<code class="literal">int_curr_symbol</code> -
</p></li><li class="listitem"><p>
<code class="literal">int_currency_symbol</code> - currency symbol for plain text display
</p></li><li class="listitem"><p>
<code class="literal">int_frac_digits</code> -
</p></li><li class="listitem"><p>
<code class="literal">mon_decimal_point</code> -
</p></li><li class="listitem"><p>
<code class="literal">mon_grouping</code> -
</p></li><li class="listitem"><p>
<code class="literal">price_picture</code> -
</p></li><li class="listitem"><p>
<code class="literal">mon_thousands_sep</code> -
</p></li><li class="listitem"><p>
<code class="literal">n_cs_precedes</code> -
</p></li><li class="listitem"><p>
<code class="literal">negative_sign</code> -
</p></li><li class="listitem"><p>
<code class="literal">p_cs_precedes</code> - whether currency symbol precedes price or vice versa
</p></li><li class="listitem"><p>
<code class="literal">p_sep_by_space</code> - number of spaces between currency symbol and price
</p></li><li class="listitem"><p>
<code class="literal">positive_sign</code> -
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="Locale_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="Locale_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_general_Locale_3091"></a><p class="title"><strong>Example: Defining general Locale</strong></p><div class="example-contents"><pre class="programlisting">
Locale fr
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Defining_Locale_by_individual_keys_3092"></a><p class="title"><strong>Example: Defining Locale by individual keys</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
Locale <localedata
</pre><p>
The actual file <code class="filename">localedata</code> could be composed
of the keys listed in <a class="xref" href="#Locale_description" title="DESCRIPTION">the section called “DESCRIPTION”</a>.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Price_displayed_as_1_000_00_EUR_3093"></a><p class="title"><strong>Example: Price displayed as 1.000,00 EUR</strong></p><div class="example-contents"><pre class="programlisting">
Locale de_DE currency_symbol EUR
Locale de_DE p_cs_precedes 0
Locale de_DE mon_decimal_point ,
Locale de_DE mon_thousands_sep .
[currency]1000[/currency]
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Locale_notes"></a><h2>NOTES</h2><p>If two locales are set "default" using <code class="option">Locale</code>, and no
<code class="option">DefaultLocale</code> is specified, the behavior is undefined as the first
"default" found will be set as the actual default.
</p></div><div class="refsect1"><a id="Locale_availability"></a><h2>AVAILABILITY</h2><p>Locale is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Locale_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_472_12131"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 472</strong></p><div class="figure-contents"><pre class="screen">
['Locale', 'locale', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_606_12132"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 606</strong></p><div class="figure-contents"><pre class="screen">
['Locale', 'locale', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3060__context_shows_lines_3060_3124__12133"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3060 (context shows lines 3060-3124)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_locale {
my($item,$settings) = @_;
return ($settings || '') unless $settings =~ /[^\d.]/;
$settings = '' if "\L$settings" eq 'default';
my $name;
my ($c, $store);
if(defined $C) {
$c = $C->{$item} || { };
$C->{$item . "_repository"} = {}
unless $C->{$item . "_repository"};
$store = $C->{$item . "_repository"};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
${"Global::$item" . "_repository"} = {}
unless ${"Global::$item" . "_repository"};
$store = ${"Global::$item" . "_repository"};
}
my ($eval, $safe);
if ($settings =~ s/^\s*([-\w.@]+)(?:\s+)?//) {
$name = $1;
undef $eval;
$settings =~ /^\s*{/
and $settings =~ /}\s*$/
and $eval = 1;
$eval and ! $safe and $safe = new Vend::Safe;
if(! defined $store->{$name} and $item eq 'Locale') {
my $past = POSIX::setlocale(POSIX::LC_ALL);
if(POSIX::setlocale(POSIX::LC_ALL, $name) ) {
$store->{$name} = POSIX::localeconv();
}
POSIX::setlocale(POSIX::LC_ALL, $past);
}
my($sethash);
if ($eval) {
$sethash = $safe->reval($settings)
or config_warn("bad Locale setting in %s: %s", $name, $@),
$sethash = {};
}
else {
$settings =~ s/^\s+//;
$settings =~ s/\s+$//;
$sethash = {};
%{$sethash} = Text::ParseWords::shellwords($settings);
}
$c = $store->{$name} || {};
my $nodefaults = delete $sethash->{MV_LOCALE_NO_DEFAULTS};
for (keys %{$sethash}) {
$c->{$_} = $sethash->{$_};
}
}
else {
config_error("Bad locale setting $settings.\n");
}
$C->{LastLocale} = $name if $C and $item eq 'Locale';
$store->{$name} = $c unless $store->{$name};
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Locale_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Locale_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#currency" class="olink"><span class="citerefentry"><span class="refentrytitle">currency</span>(7ic)</span></a>, <a class="link" href="#ExecutionLocale" title="ExecutionLocale"><span class="citerefentry"><span class="refentrytitle">ExecutionLocale</span>(7ic)</span></a>, <a class="link" href="#PriceDivide" title="PriceDivide"><span class="citerefentry"><span class="refentrytitle">PriceDivide</span>(7ic)</span></a>, <a class="link" href="#PriceCommas" title="PriceCommas"><span class="citerefentry"><span class="refentrytitle">PriceCommas</span>(7ic)</span></a>, <a class="link" href="#PageDir" title="PageDir"><span class="citerefentry"><span class="refentrytitle">PageDir</span>(7ic)</span></a>, <a class="link" href="#DefaultLocale" title="DefaultLocale"><span class="citerefentry"><span class="refentrytitle">DefaultLocale</span>(7ic)</span></a>, <a class="link" href="#HTMLsuffix" title="HTMLsuffix"><span class="citerefentry"><span class="refentrytitle">HTMLsuffix</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="LocaleDatabase"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>LocaleDatabase — specify database that contains locale settings
</p></div><div class="refsect1"><a id="LocaleDatabase_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>database_name</code></em> </p></div></div><div class="refsect1"><a id="LocaleDatabase_description"></a><h2>DESCRIPTION</h2><p>The directive specifies Interchange <a href="glossary.html#database" class="olink">database</a> that
contains <code class="option">Locale</code> settings.
</p></div><div class="refsect1"><a id="LocaleDatabase_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="LocaleDatabase_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_LocaleDatabase_4169"></a><p class="title"><strong>Example: Defining LocaleDatabase</strong></p><div class="example-contents"><pre class="programlisting">
Database locale locale.asc TAB
LocaleDatabase locale
</pre></div></div><br class="example-break" /><div class="example"><a id="example_LocaleDatabase_table_structure_4170"></a><p class="title"><strong>Example: LocaleDatabase table structure</strong></p><div class="example-contents"><pre class="programlisting">
code en_US en_GB fr_FR de_DE nl_NL
color color colour couleur Farbe kleur
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="LocaleDatabase_notes"></a><h2>NOTES</h2><p>Settings from <code class="option">LocaleDatabase</code> add on to (and override)
any that are already defined in the catalog configuration files through
the use of <code class="option">Locale</code>.
</p></div><div class="refsect1"><a id="LocaleDatabase_availability"></a><h2>AVAILABILITY</h2><p>LocaleDatabase is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="LocaleDatabase_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_608_12410"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 608</strong></p><div class="figure-contents"><pre class="screen">
['LocaleDatabase', 'configdb', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4655__context_shows_lines_4655_4705__12411"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4655 (context shows lines 4655-4705)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_configdb {
my ($var, $value) = @_;
my ($file, $type);
return '' if ! $value;
local($Vend::Cfg) = $C;
my ($db, $table);
eval {
($db, $table) = get_configdb($var, $value);
};
::logGlobal("$var $value: $@") if $@;
return '' if ! $db;
my ($k, @f); # key and fields
my @l; # refs to locale repository
my @n; # names of locales
my @h; # names of locales
my $base_direc = $var;
$base_direc =~ s/Database$//;
my $repos_name = $base_direc . '_repository';
my $repos = $C->{$repos_name} ||= {};
@n = $db->columns();
shift @n;
my $i;
if($Columnar{$base_direc}) {
my @l;
for(@n) {
$repos->{$_} ||= {};
push @l, $repos->{$_};
}
my $i;
while( ($k , undef, @f ) = $db->each_record) {
for ($i = 0; $i < @f; $i++) {
next unless length($f[$i]);
$l[$i]->{$k} = $f[$i];
}
}
}
else {
while( ($k, undef, @f ) = $db->each_record) {
for ($i = 0; $i < @f; $i++) {
next unless length($f[$i]);
$repos->{$k}{$n[$i]} = $f[$i];
}
}
}
$db->close_table();
return $table;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="LocaleDatabase_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="LocaleDatabase_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="LockType"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>LockType — specify file locking method to use
</p></div><div class="refsect1"><a id="LockType_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <code class="literal">flock</code> | <code class="literal">fcntl</code> | <code class="literal">none</code> </p></div></div><div class="refsect1"><a id="LockType_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the file locking method to use.
<code class="literal">flock</code> is the default and works well with standard
setups.
</p><p>
<code class="literal">fcntl</code> is used with <a class="ulink" href="http://nfs.sourceforge.net/" target="_top">NFS</a>. In case of NFS, both
the NFS client and server need to run the lock daemon
(<span class="command"><strong>lockd</strong></span>).
</p><p>
<code class="literal">none</code> can be used to turn off locking completely. This
is never recommended, unless you only want to see if the locking
is causing system hangs.
</p></div><div class="refsect1"><a id="LockType_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="LockType_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_LockType_2863"></a><p class="title"><strong>Example: Setting LockType</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
LockType fcntl
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="LockType_notes"></a><h2>NOTES</h2><p>Although this directive was added in <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> 4.7, due to an error later
discovered, the directive started working properly with the release
of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> 4.8.6.
</p><p>
If you are only accessing sessions on an NFS-mounted directory, but the rest
of Interchange is on the local filesystem, you can set the <code class="option">SessionType</code>
directive to <code class="literal">NFS</code> instead. That would enable
<code class="literal">fcntl</code> locking for sessions on a per-catalog basis only.
</p></div><div class="refsect1"><a id="LockType_availability"></a><h2>AVAILABILITY</h2><p>LockType is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="LockType_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_404_12076"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 404</strong></p><div class="figure-contents"><pre class="screen">
['LockType', undef, $Global::Windows ? 'none' : ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="LockType_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="LockType_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Windows" title="Windows"><span class="citerefentry"><span class="refentrytitle">Windows</span>(7ic)</span></a>, <a class="link" href="#SessionType" title="SessionType"><span class="citerefentry"><span class="refentrytitle">SessionType</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="LockoutCommand"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>LockoutCommand — specify command to run in order to lock a client out of the site
</p></div><div class="refsect1"><a id="LockoutCommand_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>command</code></em> </p></div></div><div class="refsect1"><a id="LockoutCommand_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the command (as it would be entered from the shell)
that will somehow prevent the remote IP from accessing the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> catalog, or
the whole system.
</p><p>
The IP address will be substituted for the first occurrence of the string
<code class="literal">%s</code> (which might remind you of <code class="function">printf</code>
format specifiers). The command will be executed under the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> user ID,
so you'll have to fine-tune the system privileges, or use
<span class="command"><strong>sudo</strong></span>-like tools.
</p></div><div class="refsect1"><a id="LockoutCommand_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="LockoutCommand_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Preventing_access_to_the_system_with_ipfwadm_3347"></a><p class="title"><strong>Example: Preventing access to the system with ipfwadm</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
LockoutCommand ipfwadm -I -i deny -S %s
</pre><p>
Note that the <span class="command"><strong>ipfwadm</strong></span> filtering system was used in Linux
2.0.* kernels, and is now largely obsolete.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="LockoutCommand_notes"></a><h2>NOTES</h2><p>A script could be written which would modify the appropriate access control
files, such as <code class="filename">.htaccess</code> (Web server-level)
or <code class="filename">/etc/hosts.deny</code> (TCP Wrappers-level), to do another
level of lockout.
</p><p>
Even a simple command line along the lines of
<strong class="userinput"><code>perl -0777 -npi -e 's/deny/deny from %s\ndeny/'
/path/to/cgi-bin/.htaccess</code></strong>
would work as well.
</p></div><div class="refsect1"><a id="LockoutCommand_availability"></a><h2>AVAILABILITY</h2><p>LockoutCommand is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="LockoutCommand_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_491_12202"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 491</strong></p><div class="figure-contents"><pre class="screen">
['LockoutCommand', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="LockoutCommand_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="LockoutCommand_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CreditCardAuto" title="CreditCardAuto"><span class="citerefentry"><span class="refentrytitle">CreditCardAuto</span>(7ic)</span></a>, <a class="link" href="#DomainTail" title="DomainTail"><span class="citerefentry"><span class="refentrytitle">DomainTail</span>(7ic)</span></a>, <a class="link" href="#DNSBL" title="DNSBL"><span class="citerefentry"><span class="refentrytitle">DNSBL</span>(7ic)</span></a>, <a class="link" href="#RobotLimit" title="RobotLimit"><span class="citerefentry"><span class="refentrytitle">RobotLimit</span>(7ic)</span></a>, <a class="link" href="#OrderLineLimit" title="OrderLineLimit"><span class="citerefentry"><span class="refentrytitle">OrderLineLimit</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="LogFile"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>LogFile — specify Interchange log output filename
</p></div><div class="refsect1"><a id="LogFile_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="LogFile_description"></a><h2>DESCRIPTION</h2><p>Specify <a href="glossary.html#catalog" class="olink">catalog</a> log file. If the filename is not absolute,
it is treated relative to the catalog root directory (<a href="glossary.html#CATROOT" class="olink">CATROOT</a>).
</p><p>
The file will gather output of the
<code class="function">::logData()</code> function (including the tag <code class="sgmltag-element">log</code>).
</p></div><div class="refsect1"><a id="LogFile_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="LogFile_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_LogFile_4370"></a><p class="title"><strong>Example: Setting LogFile</strong></p><div class="example-contents"><pre class="programlisting">
LogFile etc/catlog
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="LogFile_notes"></a><h2>NOTES</h2><p>This directive only specifies the default log file. The <code class="sgmltag-element">log</code> tag accepts
parameter <code class="option">file</code> to use other destinations.
</p></div><div class="refsect1"><a id="LogFile_availability"></a><h2>AVAILABILITY</h2><p>LogFile is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="LogFile_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_634_12464"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 634</strong></p><div class="figure-contents"><pre class="screen">
['LogFile', undef, 'etc/log'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="LogFile_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="LogFile_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#DebugFile" title="DebugFile"><span class="citerefentry"><span class="refentrytitle">DebugFile</span>(7ic)</span></a>, <a class="link" href="#ErrorFile" title="ErrorFile"><span class="citerefentry"><span class="refentrytitle">ErrorFile</span>(7ic)</span></a>, <a href="tags.html#log" class="olink"><span class="citerefentry"><span class="refentrytitle">log</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Logging"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Logging — specify log granularity treshold
</p></div><div class="refsect1"><a id="Logging_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>integer_treshold</code></em> </p></div></div><div class="refsect1"><a id="Logging_description"></a><h2>DESCRIPTION</h2><p>This directive specifies the desired log granularity treshold.
</p></div><div class="refsect1"><a id="Logging_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="Logging_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Logging_HTTP_headers_and_POST_data_2649"></a><p class="title"><strong>Example: Logging HTTP headers and POST data</strong></p><div class="example-contents"><pre class="programlisting">
Logging 6
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Disabling_Logging_2650"></a><p class="title"><strong>Example: Disabling Logging</strong></p><div class="example-contents"><pre class="programlisting">
Logging 0
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Logging_notes"></a><h2>NOTES</h2><p>This directive is currently largely unused in the code. The only two
<code class="option">priority_integer</code>s used are <code class="literal">4</code> and
<code class="literal">5</code>.
</p><p>
When <code class="option">Logging</code> is set to a value greater than
<code class="literal">4</code>, HTTP headers are logged.
When <code class="option">Logging</code> is set to a value greater than
<code class="literal">5</code>, contents of the POST <a href="glossary.html#HTML" class="olink">HTML</a> form submission
are logged as well.
</p></div><div class="refsect1"><a id="Logging_availability"></a><h2>AVAILABILITY</h2><p>Logging is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Logging_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_507_12017"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 507</strong></p><div class="figure-contents"><pre class="screen">
['Logging', 'integer', 0],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3965__context_shows_lines_3965_3972__12018"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3965 (context shows lines 3965-3972)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_integer {
my($var, $value) = @_;
$value = hex($value) if $value =~ /^0x[\dA-Fa-f]+$/;
$value = oct($value) if $value =~ /^0[0-7]+$/;
config_error("The $var directive (now set to '$value') must be an integer\n")
unless $value =~ /^\d+$/;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Logging_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Logging_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#SysLog" title="SysLog"><span class="citerefentry"><span class="refentrytitle">SysLog</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="MailOrderTo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MailOrderTo — specify e-mail address that completed orders should be sent to
</p></div><div class="refsect1"><a id="MailOrderTo_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>e-mail_address</code></em> </p></div></div><div class="refsect1"><a id="MailOrderTo_description"></a><h2>DESCRIPTION</h2><p>The directive specifies
an e-mail address that completed orders should be sent to.
With a setting of '<code class="literal">none</code>', no e-mail order reports
would be sent.
</p></div><div class="refsect1"><a id="MailOrderTo_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="MailOrderTo_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_MailOrderTo_3728"></a><p class="title"><strong>Example: Defining MailOrderTo</strong></p><div class="example-contents"><pre class="programlisting">
MailOrderTo orders@mydomain.local
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="MailOrderTo_notes"></a><h2>NOTES</h2><p><code class="option">MailOrderTo</code> is one of the basic Interchange <a href="glossary.html#configuration" class="olink">configuration</a>
directives.
</p><p>
If the <code class="filename">catalog.cfg</code> file, expected in the catalog base directory, is not found, or is
unreadable by the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server, somewhat misguiding error message will be reported.
Namely, instead of the appropriate permissions-problem message, this mandatory
<code class="option">MailOrderTo</code> directive will be reported undefined.
</p></div><div class="refsect1"><a id="MailOrderTo_availability"></a><h2>AVAILABILITY</h2><p>MailOrderTo is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="MailOrderTo_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_600_12312"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 600</strong></p><div class="figure-contents"><pre class="screen">
['MailOrderTo', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="MailOrderTo_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="MailOrderTo_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#VendURL" title="VendURL"><span class="citerefentry"><span class="refentrytitle">VendURL</span>(7ic)</span></a>, <a class="link" href="#Catalog" title="Catalog"><span class="citerefentry"><span class="refentrytitle">Catalog</span>(7ic)</span></a>, <a href="vars.html#MV_MAILFROM" class="olink"><span class="citerefentry"><span class="refentrytitle">MV_MAILFROM</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Mall"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Mall — issue cookies only for the current catalog, and not the base domain
</p></div><div class="refsect1"><a id="Mall_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="Mall_description"></a><h2>DESCRIPTION</h2><p>Issue <a href="glossary.html#cookie" class="olink">cookie</a>s only for the current catalog's script. By
default, when <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> issues a cookie, it does so for the whole base domain.
</p><p>
This setting will allow multiple catalogs to operate on the same domain
without interfering with each others session ID.
</p></div><div class="refsect1"><a id="Mall_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="Mall_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_Mall_2795"></a><p class="title"><strong>Example: Enabling Mall</strong></p><div class="example-contents"><pre class="programlisting">
Mall Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Mall_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Mall_availability"></a><h2>AVAILABILITY</h2><p>Mall is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Mall_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_460_12059"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 460</strong></p><div class="figure-contents"><pre class="screen">
['Mall', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12060"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Mall_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Mall_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#CookieDomain" title="CookieDomain"><span class="citerefentry"><span class="refentrytitle">CookieDomain</span>(7ic)</span></a>, <a class="link" href="#Cookies" title="Cookies"><span class="citerefentry"><span class="refentrytitle">Cookies</span>(7ic)</span></a>, <a class="link" href="#CookieLogin" title="CookieLogin"><span class="citerefentry"><span class="refentrytitle">CookieLogin</span>(7ic)</span></a>, <a class="link" href="#TrustProxy" title="TrustProxy"><span class="citerefentry"><span class="refentrytitle">TrustProxy</span>(7ic)</span></a>, <a class="link" href="#SubCatalog" title="SubCatalog"><span class="citerefentry"><span class="refentrytitle">SubCatalog</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="MasterHost"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MasterHost — specify regular expression that client IP must match to access protected directories
</p></div><div class="refsect1"><a id="MasterHost_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>hostname_or_IP_regexp</code></em> </p></div></div><div class="refsect1"><a id="MasterHost_description"></a><h2>DESCRIPTION</h2><p>This directive specifies the hostname or IP <a href="glossary.html#regexp" class="olink">regexp</a> that the
incoming requests must match in order to be allowed access to protected
directories (see <a href="glossary.html#gate" class="olink">gate</a> glossary entry), databases and administrative functions.
</p></div><div class="refsect1"><a id="MasterHost_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="MasterHost_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_MasterHost_4675"></a><p class="title"><strong>Example: Defining MasterHost</strong></p><div class="example-contents"><pre class="programlisting">
MasterHost 127\.0\.0\.1
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Defining_MasterHost_4676"></a><p class="title"><strong>Example: Defining MasterHost</strong></p><div class="example-contents"><pre class="programlisting">
MasterHost my\.workstation\.domain\.com|192\.168\.7\.28
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="MasterHost_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="MasterHost_availability"></a><h2>AVAILABILITY</h2><p>MasterHost is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="MasterHost_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_658_12539"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 658</strong></p><div class="figure-contents"><pre class="screen">
['MasterHost', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="MasterHost_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="MasterHost_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RemoteUser" title="RemoteUser"><span class="citerefentry"><span class="refentrytitle">RemoteUser</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="MaxQuantityField"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MaxQuantityField — specify tables and columns containing maximum allowed quantity for an item
</p></div><div class="refsect1"><a id="MaxQuantityField_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>[ = | ? ] [<em class="replaceable"><code>table</code></em>:] <em class="replaceable"><code>column</code></em> </p></div></div><div class="refsect1"><a id="MaxQuantityField_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">MaxQuantityField</code> directive specifies <a href="glossary.html#database" class="olink">database</a>s
and database columns containing the maximum allowed order quantity
for an item.
</p><p>
If the argument contains a colon "<code class="literal">:</code>", it is treated
as a <code class="literal"><em class="replaceable"><code>TABLE:COLUMN</code></em></code> specification.
Otherwise it indicates the name of the column and the table
defaults to the first <code class="option">ProductFiles</code> database.
</p><p>
The record with the matching product <a href="glossary.html#SKU" class="olink">SKU</a> must exist in the
target database, or the quantity will be unlimited.
</p><p>
It is possible to specify multiple database fields (separated by commas or
spaces), in which case the maximum quantity allowed is set to the sum of
all quantities
found.
</p><p>
As of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> 5.7.0, a field prefixed with <code class="literal">=</code> overrides
any previous value, while a field prefixed with <code class="literal">?</code>
overrides previous value only if the new value is greater than zero.
</p></div><div class="refsect1"><a id="MaxQuantityField_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="MaxQuantityField_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_MaxQuantityField_3575"></a><p class="title"><strong>Example: Setting MaxQuantityField</strong></p><div class="example-contents"><pre class="programlisting">
MaxQuantityField max_quantity
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_MaxQuantityField_3576"></a><p class="title"><strong>Example: Setting MaxQuantityField</strong></p><div class="example-contents"><pre class="programlisting">
MaxQuantityField inventory:quantity
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_MaxQuantityField_3577"></a><p class="title"><strong>Example: Setting MaxQuantityField</strong></p><div class="example-contents"><pre class="programlisting">
MaxQuantityField inventory:quantity, products:in_stock products:on_hand
</pre><p>
Notice we can use commas and whitespace interchangeably to separate fields.
</p></div></div><br class="example-break" /><div class="example"><a id="example_Setting_MaxQuantityField_3578"></a><p class="title"><strong>Example: Setting MaxQuantityField</strong></p><div class="example-contents"><p>Override any previous value with
<span class="database">products:on_hand</span>,
if it contains a value greater than zero.</p><pre class="programlisting">
MaxQuantityField inventory:quantity ?products:on_hand
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="MaxQuantityField_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="MaxQuantityField_availability"></a><h2>AVAILABILITY</h2><p>MaxQuantityField is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="MaxQuantityField_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_632_12274"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 632</strong></p><div class="figure-contents"><pre class="screen">
['MaxQuantityField', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="MaxQuantityField_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="MaxQuantityField_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#MinQuantityField" title="MinQuantityField"><span class="citerefentry"><span class="refentrytitle">MinQuantityField</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="MaxRequestsPerChild"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MaxRequestsPerChild — define maximum number of per-server page deliveries before respawn
</p></div><div class="refsect1"><a id="MaxRequestsPerChild_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>count</code></em> </p></div></div><div class="refsect1"><a id="MaxRequestsPerChild_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">MaxRequestsPerChild</code> directive defines the maximum number
of page deliveries that each server instance will carry out before
closing down and respawning.
</p><p>
The whole point of a periodic respawn is to prevent accumulation of
eventual memory leaks.
</p></div><div class="refsect1"><a id="MaxRequestsPerChild_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="MaxRequestsPerChild_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_MaxRequestsPerChild_2903"></a><p class="title"><strong>Example: Setting MaxRequestsPerChild</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
MaxRequestsPerChild 100
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="MaxRequestsPerChild_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="MaxRequestsPerChild_availability"></a><h2>AVAILABILITY</h2><p>MaxRequestsPerChild is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="MaxRequestsPerChild_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_448_12086"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 448</strong></p><div class="figure-contents"><pre class="screen">
['MaxRequestsPerChild','integer', 50],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3965__context_shows_lines_3965_3972__12087"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3965 (context shows lines 3965-3972)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_integer {
my($var, $value) = @_;
$value = hex($value) if $value =~ /^0x[\dA-Fa-f]+$/;
$value = oct($value) if $value =~ /^0[0-7]+$/;
config_error("The $var directive (now set to '$value') must be an integer\n")
unless $value =~ /^\d+$/;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="MaxRequestsPerChild_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="MaxRequestsPerChild_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#PIDcheck" title="PIDcheck"><span class="citerefentry"><span class="refentrytitle">PIDcheck</span>(7ic)</span></a>, <a class="link" href="#SOAP_MaxRequests" title="SOAP_MaxRequests"><span class="citerefentry"><span class="refentrytitle">SOAP_MaxRequests</span>(7ic)</span></a>, <a class="link" href="#PIDfile" title="PIDfile"><span class="citerefentry"><span class="refentrytitle">PIDfile</span>(7ic)</span></a>, <a class="link" href="#MaxServers" title="MaxServers"><span class="citerefentry"><span class="refentrytitle">MaxServers</span>(7ic)</span></a>, <a class="link" href="#ChildLife" title="ChildLife"><span class="citerefentry"><span class="refentrytitle">ChildLife</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="MaxServers"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MaxServers — define maximum number of spawned servers
</p></div><div class="refsect1"><a id="MaxServers_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>count</code></em> </p></div></div><div class="refsect1"><a id="MaxServers_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">MaxServers</code> directive specifies the maximum number
of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server processes to keep running at any one time.
</p><p>
If more requests are pending, they will be queued within the defined
capability of the Operating System (usually 5 pending requests) until the
server's "usage count" drops.
</p></div><div class="refsect1"><a id="MaxServers_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="MaxServers_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_MaxServers_3219"></a><p class="title"><strong>Example: Setting MaxServers</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
MaxServers 20
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="MaxServers_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="MaxServers_availability"></a><h2>AVAILABILITY</h2><p>MaxServers is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="MaxServers_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_467_12167"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 467</strong></p><div class="figure-contents"><pre class="screen">
['MaxServers', 'integer', 10],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3965__context_shows_lines_3965_3972__12168"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3965 (context shows lines 3965-3972)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_integer {
my($var, $value) = @_;
$value = hex($value) if $value =~ /^0x[\dA-Fa-f]+$/;
$value = oct($value) if $value =~ /^0[0-7]+$/;
config_error("The $var directive (now set to '$value') must be an integer\n")
unless $value =~ /^\d+$/;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="MaxServers_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="MaxServers_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#MaxRequestsPerChild" title="MaxRequestsPerChild"><span class="citerefentry"><span class="refentrytitle">MaxRequestsPerChild</span>(7ic)</span></a>, <a class="link" href="#PIDcheck" title="PIDcheck"><span class="citerefentry"><span class="refentrytitle">PIDcheck</span>(7ic)</span></a>, <a class="link" href="#PIDfile" title="PIDfile"><span class="citerefentry"><span class="refentrytitle">PIDfile</span>(7ic)</span></a>, <a class="link" href="#ChildLife" title="ChildLife"><span class="citerefentry"><span class="refentrytitle">ChildLife</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Member"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Member — override catalog variables for logged-in users
</p></div><div class="refsect1"><a id="Member_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>NAME</code></em>
<em class="replaceable"><code>value</code></em>
... </p></div></div><div class="refsect1"><a id="Member_description"></a><h2>DESCRIPTION</h2><p>The directive overrides values of catalog variables for logged-in users
(usually members of the site).
</p><p>
The override functionality is available when the catalog variable is
accessed using the <code class="sgmltag-element">var</code> tag.
</p></div><div class="refsect1"><a id="Member_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Member_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Overriding_a_variable_4230"></a><p class="title"><strong>Example: Overriding a variable</strong></p><div class="example-contents"><p>Put the following in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
Variable GREETING Hello, Guest!
Member GREETING Hello, Member!
</pre><p>
Put the following on an <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> page:</p><pre class="programlisting">
[var GREETING]
</pre><p>
The above will return <code class="literal">Hello, Guest!</code> or
<code class="literal">Hello, Member!</code>, depending on whether
the user is logged in or not.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="Member_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Member_availability"></a><h2>AVAILABILITY</h2><p>Member is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Member_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_594_12430"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 594</strong></p><div class="figure-contents"><pre class="screen">
['Member', 'variable', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5259__context_shows_lines_5259_5281__12431"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5259 (context shows lines 5259-5281)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_variable {
my ($var, $value) = @_;
my ($c, $name, $param);
# Allow certain catalogs global subs
unless (defined $value and $value) {
$c = { 'save' => {} };
return $c;
}
if(defined $C) {
$c = $C->{$var};
}
else {
no strict 'refs';
$c = ${"Global::$var"};
}
($name, $param) = split /\s+/, $value, 2;
chomp $param;
$c->{$name} = $param;
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Member_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Member_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#var" class="olink"><span class="citerefentry"><span class="refentrytitle">var</span>(7ic)</span></a>, <a class="link" href="#Variable" title="Variable"><span class="citerefentry"><span class="refentrytitle">Variable</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Message"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Message — write custom message to console and Interchange log
</p></div><div class="refsect1"><a id="Message_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>[<code class="literal">-n</code>] [<code class="literal">-i</code>] <em class="replaceable"><code>message</code></em> </p></div></div><div class="refsect1"><a id="Message_description"></a><h2>DESCRIPTION</h2><p>This configuration directive displays a specified message on the console
and in the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> log.
</p><p>
If the "option" <code class="literal">-n</code> is present, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> strips leading and
trailing whitespace before display. If <code class="literal">-i</code> is present
and <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> is running in the foreground (that is, without detaching from the
controlling terminal), then the message is only output to the console,
avoiding the log.
</p></div><div class="refsect1"><a id="Message_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="Message_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Specifying_Message_3203"></a><p class="title"><strong>Example: Specifying Message</strong></p><div class="example-contents"><p>Message -n Test message
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="Message_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Message_availability"></a><h2>AVAILABILITY</h2><p>Message is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Message_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_398_12162"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 398</strong></p><div class="figure-contents"><pre class="screen">
['Message', 'message', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_550_12163"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 550</strong></p><div class="figure-contents"><pre class="screen">
['Message', 'message', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2946__context_shows_lines_2946_2979__12164"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2946 (context shows lines 2946-2979)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_message {
my($name, $val) = @_;
return '' unless $val;
return 1 if $Vend::Quiet;
my $strip;
my $info_only;
## strip trailing whitespace if -n beins message
while($val =~ s/^-([ni])\s+//) {
$1 eq 'n' and $val =~ s/^-n\s+// and $strip = 1 and $val =~ s/\s+$//;
$info_only = 1 if $1 eq 'i';
}
my $msg = errmsg($val,
$name,
$.,
$configfile,
);
if($info_only and $Global::Foreground) {
print $msg;
}
else {
logGlobal({level => 'info', strip => $strip },
errmsg($val,
$name,
$.,
$configfile,
)
);
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Message_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Message_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#log" class="olink"><span class="citerefentry"><span class="refentrytitle">log</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="MimeType"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MimeType — specify MIME types
</p></div><div class="refsect1"><a id="MimeType_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>extension</code></em>
<em class="replaceable"><code>mime_type_name</code></em>
... </p></div></div><div class="refsect1"><a id="MimeType_description"></a><h2>DESCRIPTION</h2><p>The directive defines MIME types.
</p><p>
The argument <code class="literal">extension</code> is the filename extension,
or a special value "<code class="literal">default</code>" to apply to unknown
content.
</p></div><div class="refsect1"><a id="MimeType_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="MimeType_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_MimeType_3985"></a><p class="title"><strong>Example: Defining MimeType</strong></p><div class="example-contents"><pre class="programlisting">
MimeType itl text/plain
MimeType default text/plain
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="MimeType_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="MimeType_availability"></a><h2>AVAILABILITY</h2><p>MimeType is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="MimeType_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_619_12369"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 619</strong></p><div class="figure-contents"><pre class="screen">
['MimeType', 'hash', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12370"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="MimeType_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="MimeType_seeAlso"></a><h2>SEE ALSO</h2><p><a href="filters.html#mime_type" class="olink"><span class="citerefentry"><span class="refentrytitle">mime_type</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="MinQuantityField"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MinQuantityField — specify table and/or column containing minimum allowed quantity for an item
</p></div><div class="refsect1"><a id="MinQuantityField_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>table</code></em>:<em class="replaceable"><code>column</code></em>
|
<em class="replaceable"><code>column</code></em>
</p></div></div><div class="refsect1"><a id="MinQuantityField_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">MinQuantityField</code> directive specifies the <a href="glossary.html#database" class="olink">database</a>
and database column containing the minimum allowed order quantity
for an item.
</p><p>
When two arguments are supplied (concatenated by a colon, <code class="literal">:</code>),
they indicate the appropriate <a href="glossary.html#database" class="olink">database</a> table and column name.
When only one argument is supplied, it indicates the name of the column;
table defaults to the <span class="database">products</span> database.
</p><p>
The code of the item in question must be present in the
database (<span class="database">code</span> column),
or there will be no minumum quantity enforced.
</p></div><div class="refsect1"><a id="MinQuantityField_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="MinQuantityField_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_MinQuantityField_4015"></a><p class="title"><strong>Example: Setting MinQuantityField</strong></p><div class="example-contents"><pre class="programlisting">
MinQuantityField min_quantity
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_MinQuantityField_4016"></a><p class="title"><strong>Example: Setting MinQuantityField</strong></p><div class="example-contents"><pre class="programlisting">
MinQuantityField inventory:min_batch
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="MinQuantityField_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="MinQuantityField_availability"></a><h2>AVAILABILITY</h2><p>MinQuantityField is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="MinQuantityField_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_633_12376"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 633</strong></p><div class="figure-contents"><pre class="screen">
['MinQuantityField', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="MinQuantityField_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="MinQuantityField_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#MaxQuantityField" title="MaxQuantityField"><span class="citerefentry"><span class="refentrytitle">MaxQuantityField</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="MoreDB"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MoreDB — enable saving of search paging files into users' DBI sessions
</p></div><div class="refsect1"><a id="MoreDB_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="MoreDB_description"></a><h2>DESCRIPTION</h2><p>This directive enables saving of search paging files into users'
<a href="glossary.html#session" class="olink">session</a>s.
</p><p>
This eliminates the need to have a <code class="option">ScratchDir</code> directory
between all <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server nodes.
</p><p>
This directive can only be used with DBI (database) <a href="glossary.html#session" class="olink">session</a>s; trying
to use it with non-database sessions will cause errors.
</p></div><div class="refsect1"><a id="MoreDB_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="MoreDB_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_MoreDB_4482"></a><p class="title"><strong>Example: Enabling MoreDB</strong></p><div class="example-contents"><pre class="programlisting">
SessionType DBI
SessionDB session
MoreDB Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="MoreDB_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="MoreDB_availability"></a><h2>AVAILABILITY</h2><p>MoreDB is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="MoreDB_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_585_12489"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 585</strong></p><div class="figure-contents"><pre class="screen">
['MoreDB', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12490"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="MoreDB_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="MoreDB_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#SessionDB" title="SessionDB"><span class="citerefentry"><span class="refentrytitle">SessionDB</span>(7ic)</span></a>, <a class="link" href="#SessionType" title="SessionType"><span class="citerefentry"><span class="refentrytitle">SessionType</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="NoAbsolute"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>NoAbsolute — deny catalogs to read absolute filenames on the system
</p></div><div class="refsect1"><a id="NoAbsolute_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="NoAbsolute_description"></a><h2>DESCRIPTION</h2><p>The directive specifies whether to prevent commands and tags (such as
<code class="sgmltag-element">file</code>) to read absolute filenames (any files) on the system.
In cases where the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> daemon has no permission to read the file , this
directive — of course — has no influence.
</p><p>
This should be enabled in multiuser environments to minimize security
problems.
</p></div><div class="refsect1"><a id="NoAbsolute_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="NoAbsolute_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_NoAbsolute_3252"></a><p class="title"><strong>Example: Enabling NoAbsolute</strong></p><div class="example-contents"><p>Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
NoAbsolute Yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="NoAbsolute_notes"></a><h2>NOTES</h2><p>Note that this does not apply to tests for whether a file exists (as one
would do with <code class="code">[if file ...]</code> or similar). Such operations are
allowed regardless of <code class="option">NoAbsolute</code>.
</p></div><div class="refsect1"><a id="NoAbsolute_availability"></a><h2>AVAILABILITY</h2><p>NoAbsolute is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="NoAbsolute_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_494_12176"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 494</strong></p><div class="figure-contents"><pre class="screen">
['NoAbsolute', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12177"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="NoAbsolute_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="NoAbsolute_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="NoExport"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>NoExport — specify databases not to re-export
</p></div><div class="refsect1"><a id="NoExport_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>table_name</code></em>... </p></div></div><div class="refsect1"><a id="NoExport_description"></a><h2>DESCRIPTION</h2><p>The directive specifies external <a href="glossary.html#database" class="olink">database</a> tables that should
never be exported back to the text source files.
</p><p>
Invocations of <code class="sgmltag-element">backup-database</code> are not affected
by this setting, and <code class="sgmltag-element">export</code> can force the export by specifying
<code class="literal">force=1</code>.
</p></div><div class="refsect1"><a id="NoExport_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="NoExport_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Disabling__products__and__inventory__table_export_4519"></a><p class="title"><strong>Example: Disabling 'products' and 'inventory' table export</strong></p><div class="example-contents"><p>Put the following in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
NoExportExternal yes
NoExport products inventory
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="NoExport_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="NoExport_availability"></a><h2>AVAILABILITY</h2><p>NoExport is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="NoExport_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_636_12497"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 636</strong></p><div class="figure-contents"><pre class="screen">
['NoExport', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12498"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="NoExport_authors"></a><h2>AUTHORS</h2><p>Jon Jensen and Mark Johnson
</p></div><div class="refsect1"><a id="NoExport_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#NoExportExternal" title="NoExportExternal"><span class="citerefentry"><span class="refentrytitle">NoExportExternal</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="NoExportExternal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>NoExportExternal — enable use of the NoExport directive
</p></div><div class="refsect1"><a id="NoExportExternal_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="NoExportExternal_description"></a><h2>DESCRIPTION</h2><p>The directive disables automatic export of internal database formats
(<a href="glossary.html#SQL" class="olink">SQL</a> and LDAP) back to the text source files.
</p><p>
Invocations of <code class="sgmltag-element">backup-database</code> are not affected
by this setting, and <code class="sgmltag-element">export</code> can force the export by specifying
<code class="literal">force=1</code>.
</p></div><div class="refsect1"><a id="NoExportExternal_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="NoExportExternal_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_NoExportExternal_4206"></a><p class="title"><strong>Example: Enabling NoExportExternal</strong></p><div class="example-contents"><pre class="programlisting">
NoExportExternal yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="NoExportExternal_notes"></a><h2>NOTES</h2><p>For an introduction to "exporting" and the times it can occur, see
<a href="glossary.html#database" class="olink">database</a> glossary entry and the <code class="option">NoExport</code> configuration
directive.
</p></div><div class="refsect1"><a id="NoExportExternal_availability"></a><h2>AVAILABILITY</h2><p>NoExportExternal is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="NoExportExternal_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_637_12419"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 637</strong></p><div class="figure-contents"><pre class="screen">
['NoExportExternal', 'yesno', 'no'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12420"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="NoExportExternal_authors"></a><h2>AUTHORS</h2><p>Jon Jensen and Mark Johnson
</p></div><div class="refsect1"><a id="NoExportExternal_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#NoImport" title="NoImport"><span class="citerefentry"><span class="refentrytitle">NoImport</span>(7ic)</span></a>, <a class="link" href="#NoImportExternal" title="NoImportExternal"><span class="citerefentry"><span class="refentrytitle">NoImportExternal</span>(7ic)</span></a>, <a class="link" href="#NoExport" title="NoExport"><span class="citerefentry"><span class="refentrytitle">NoExport</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="NoImport"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>NoImport — specify databases not to re-import, unless the database completely disappears
</p></div><div class="refsect1"><a id="NoImport_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>table_name</code></em>... </p></div></div><div class="refsect1"><a id="NoImport_description"></a><h2>DESCRIPTION</h2><p>The directive specifies <a href="glossary.html#database" class="olink">database</a> tables that should never be
automatically imported from the text source files.
</p></div><div class="refsect1"><a id="NoImport_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="NoImport_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Disabling__products__and__inventory__table_import_3925"></a><p class="title"><strong>Example: Disabling 'products' and 'inventory' table import</strong></p><div class="example-contents"><p>Put the following in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
NoImport products inventory
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="NoImport_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="NoImport_availability"></a><h2>AVAILABILITY</h2><p>NoImport is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="NoImport_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_638_12357"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 638</strong></p><div class="figure-contents"><pre class="screen">
['NoImport', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12358"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="NoImport_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="NoImport_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#NoImportExternal" title="NoImportExternal"><span class="citerefentry"><span class="refentrytitle">NoImportExternal</span>(7ic)</span></a>, <a class="link" href="#NoExportExternal" title="NoExportExternal"><span class="citerefentry"><span class="refentrytitle">NoExportExternal</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="NoImportExternal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>NoImportExternal — do not re-import external databases
</p></div><div class="refsect1"><a id="NoImportExternal_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="NoImportExternal_description"></a><h2>DESCRIPTION</h2><p>The directive specifies that all external <a href="glossary.html#database" class="olink">database</a> tables
should not be reimported from text source files.
</p></div><div class="refsect1"><a id="NoImportExternal_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="NoImportExternal_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_NoImportExternal_3603"></a><p class="title"><strong>Example: Enabling NoImportExternal</strong></p><div class="example-contents"><pre class="programlisting">
NoImportExternal 1
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="NoImportExternal_notes"></a><h2>NOTES</h2><p>For an introduction to "importing" and the times it can occur, see
<a href="glossary.html#database" class="olink">database</a> glossary entry and the <code class="option">NoImport</code> configuration
directive.
</p></div><div class="refsect1"><a id="NoImportExternal_availability"></a><h2>AVAILABILITY</h2><p>NoImportExternal is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="NoImportExternal_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_639_12280"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 639</strong></p><div class="figure-contents"><pre class="screen">
['NoImportExternal', 'yesno', 'no'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12281"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="NoImportExternal_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="NoImportExternal_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#NoImport" title="NoImport"><span class="citerefentry"><span class="refentrytitle">NoImport</span>(7ic)</span></a>, <a class="link" href="#NoExportExternal" title="NoExportExternal"><span class="citerefentry"><span class="refentrytitle">NoExportExternal</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="NoSearch"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>NoSearch — specify databases on which Interchange-style searches cannot be performed
</p></div><div class="refsect1"><a id="NoSearch_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>database_name_glob</code></em>
... </p></div></div><div class="refsect1"><a id="NoSearch_description"></a><h2>DESCRIPTION</h2><p>Specify database names or globs that will be matched against the databases
used in any attempted search.
You may separate multiple match strings with whitespace, and may include
shell-style wildcards (globs).
</p><p>
The default setting is <code class="literal">userdb</code>, which
means that, by default, you cannot use <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>-style searches on the
<span class="database">userdb</span> table.
</p></div><div class="refsect1"><a id="NoSearch_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="NoSearch_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_NoSearch_4336"></a><p class="title"><strong>Example: Defining NoSearch</strong></p><div class="example-contents"><p>Disable searching on <span class="database">userdb</span>, and other databases
beginning with "<code class="literal">.</code>" or ending in "<code class="literal">.secret</code>".</p><pre class="programlisting">
NoSearch userdb .* *.secret
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Overriding_NoSearch_setting_on_a_specific_page_4337"></a><p class="title"><strong>Example: Overriding NoSearch setting on a specific page</strong></p><div class="example-contents"><pre class="programlisting">
[calc] $Config->{NoSearch} = '' [/calc]
</pre><p>
For a discussion on why this example works (and works per-page), see
<a href="glossary.html#configuration" class="olink">configuration</a> glossary entry.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="NoSearch_notes"></a><h2>NOTES</h2><p>This directive only disables <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> file/database-based searches; pure SQL
searches still work.
</p></div><div class="refsect1"><a id="NoSearch_availability"></a><h2>AVAILABILITY</h2><p>NoSearch is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="NoSearch_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_616_12455"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 616</strong></p><div class="figure-contents"><pre class="screen">
['NoSearch', 'wildcard', 'userdb'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3841__context_shows_lines_3841_3861__12456"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3841 (context shows lines 3841-3861)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_wildcard {
my($var, $value) = @_;
return '' if ! $value;
$value =~ s/\./\\./g;
$value =~ s/\*/.*/g;
$value =~ s/\?/./g;
$value =~
s[({(?:.+?,)+.+?})]
[ local $_ = $1; tr/{,}/(|)/; $_ ]eg;
$value =~ s/\s+/|/g;
eval {
my $never = 'NeVAirBE';
$never =~ m{$value};
};
if($@) {
config_error("Bad regular expression in $var.");
}
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="NoSearch_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="NoSearch_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="NonTaxableField"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>NonTaxableField — specify name of the non-taxable field in the products database
</p></div><div class="refsect1"><a id="NonTaxableField_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>field_name</code></em> </p></div></div><div class="refsect1"><a id="NonTaxableField_description"></a><h2>DESCRIPTION</h2><p>The directive specifies
name of the field in the <span class="database">products</span> <a href="glossary.html#database" class="olink">database</a> that,
set to <code class="literal">1</code> or <code class="literal">Yes</code>, sets an item as
non-<a href="glossary.html#tax" class="olink">tax</a>able.
</p><p>
Interchange will log an error and tax it anyway if the field doesn't exist
in the database.
</p><p>
An empty definition (the default) disables this feature.
</p></div><div class="refsect1"><a id="NonTaxableField_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="NonTaxableField_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_NonTaxableField_3914"></a><p class="title"><strong>Example: Defining NonTaxableField</strong></p><div class="example-contents"><pre class="programlisting">
NonTaxableField wholesale
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="NonTaxableField_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="NonTaxableField_availability"></a><h2>AVAILABILITY</h2><p>NonTaxableField is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="NonTaxableField_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_667_12355"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 667</strong></p><div class="figure-contents"><pre class="screen">
['NonTaxableField', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="NonTaxableField_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="NonTaxableField_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="NotRobotUA"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>NotRobotUA — specify user-agents that will NOT be classified as crawler bots (search engines)
</p></div><div class="refsect1"><a id="NotRobotUA_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>useragent_string</code></em>... </p></div></div><div class="refsect1"><a id="NotRobotUA_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">NotRobotUA</code> directive defines a list of useragent strings which will
<span class="bold"><strong>never</strong></span> be classified as crawler robots
(search engines) visiting the site.
</p><p>
This directive has priority over <code class="option">RobotUA</code>.
If the user agent matches <code class="option">NotRobotUA</code>, then the check for
<code class="option">RobotUA</code> is not performed and the client is not treated
as an unattended <a href="glossary.html#robot" class="olink">robot</a>.
</p></div><div class="refsect1"><a id="NotRobotUA_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="NotRobotUA_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_NotRobotUA_3065"></a><p class="title"><strong>Example: Defining NotRobotUA</strong></p><div class="example-contents"><pre class="programlisting">
NotRobotUA <<EOR
*wget*
EOR
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="NotRobotUA_notes"></a><h2>NOTES</h2><p>For more details regarding web spiders/bots and <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>, see
<a href="glossary.html#robot" class="olink">robot</a> glossary entry.
</p><p>
For more details regarding user sessions, see <a href="glossary.html#session" class="olink">session</a> glossary
entry.
</p></div><div class="refsect1"><a id="NotRobotUA_availability"></a><h2>AVAILABILITY</h2><p>NotRobotUA is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="NotRobotUA_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_484_12125"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 484</strong></p><div class="figure-contents"><pre class="screen">
['NotRobotUA', 'list_wildcard', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3828__context_shows_lines_3828_3832__12126"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3828 (context shows lines 3828-3832)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_list_wildcard {
my $value = get_wildcard_list(@_,0);
return '' unless length($value);
return qr/$value/i;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="NotRobotUA_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="NotRobotUA_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RobotIP" title="RobotIP"><span class="citerefentry"><span class="refentrytitle">RobotIP</span>(7ic)</span></a>, <a class="link" href="#RobotUA" title="RobotUA"><span class="citerefentry"><span class="refentrytitle">RobotUA</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OfflineDir"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OfflineDir — specify directory to use for "offline" files
</p></div><div class="refsect1"><a id="OfflineDir_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory</code></em>... </p></div></div><div class="refsect1"><a id="OfflineDir_description"></a><h2>DESCRIPTION</h2><p>Specify directory to use for the offline database files, which are generated
by the offline database build command.
</p></div><div class="refsect1"><a id="OfflineDir_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OfflineDir_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_OfflineDir_3749"></a><p class="title"><strong>Example: Setting OfflineDir</strong></p><div class="example-contents"><pre class="programlisting">
OfflineDir /usr/data/interchange/offline
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="OfflineDir_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="OfflineDir_availability"></a><h2>AVAILABILITY</h2><p>OfflineDir is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OfflineDir_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_542_12317"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 542</strong></p><div class="figure-contents"><pre class="screen">
['OfflineDir', 'relative_dir', 'offline'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3948__context_shows_lines_3948_3962__12318"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3948 (context shows lines 3948-3962)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_relative_dir {
my($var, $value) = @_;
if (absolute_or_relative($value)) {
config_error('Path %s not allowed in %s directive',
$value, $var);
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OfflineDir_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OfflineDir_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OnFly"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OnFly — enable on-fly additions to client shopping cart
</p></div><div class="refsect1"><a id="OnFly_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <code class="literal">0</code> | <code class="literal">1</code> | <em class="replaceable"><code>ITL_tag_name</code></em> </p></div></div><div class="refsect1"><a id="OnFly_description"></a><h2>DESCRIPTION</h2><p>If the directive is enabled, it enables on-the-fly item additions to the
client shopping cart. If set to a name of an existing <a href="glossary.html#ITL" class="olink">ITL</a> tag,
the tag definition will be used to parse and format the item with the
following call:
</p><p>
</p><pre class="programlisting">
$item = Vend::Parse::do_tag($Vend::Cfg->{OnFly},
$code,
$quantity,
$fly[$j],
);
</pre><p>
In other words, your custom tag will be invoked with four arguments,
of which the first three are the tag name, item code and item quantity
respectively,
and the last argument is the value of <code class="mv">mv_order_fly</code> <a href="glossary.html#mv" class="olink">mv</a>
variable for the item.
</p><p>
The default <code class="sgmltag-element">onfly</code> tag that you can use in place of
<code class="option">ITL_tag_name</code> is already provided in <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>.
</p></div><div class="refsect1"><a id="OnFly_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OnFly_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_OnFly_4669"></a><p class="title"><strong>Example: Enabling OnFly</strong></p><div class="example-contents"><pre class="programlisting">
OnFly 1
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Configuring_OnFly_with_a_custom_ITL_tag_4670"></a><p class="title"><strong>Example: Configuring OnFly with a custom ITL tag</strong></p><div class="example-contents"><pre class="programlisting">
OnFly my_onfly_tag
</pre><p>
For your custom tag, use the existing <code class="sgmltag-element">onfly</code> tag as a starting
point, whose
CVS source is available online in <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/code/SystemTag/onfly.coretag" target="_top">code/SystemTag/onfly.coretag</a>.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="OnFly_notes"></a><h2>NOTES</h2><p>See <a href="glossary.html#onfly" class="olink">onfly</a> glossary entry for a complete discussion.
</p></div><div class="refsect1"><a id="OnFly_availability"></a><h2>AVAILABILITY</h2><p>OnFly is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OnFly_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_695_12538"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 695</strong></p><div class="figure-contents"><pre class="screen">
['OnFly', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OnFly_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OnFly_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Options"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Options</p></div><div class="refsect1"><a id="Options_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="Options_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="Options_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Options_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="Options_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Options_availability"></a><h2>AVAILABILITY</h2><p>Options is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Options_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_645_12461"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 645</strong></p><div class="figure-contents"><pre class="screen">
['Options', 'locale', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3060__context_shows_lines_3060_3124__12462"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3060 (context shows lines 3060-3124)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_locale {
my($item,$settings) = @_;
return ($settings || '') unless $settings =~ /[^\d.]/;
$settings = '' if "\L$settings" eq 'default';
my $name;
my ($c, $store);
if(defined $C) {
$c = $C->{$item} || { };
$C->{$item . "_repository"} = {}
unless $C->{$item . "_repository"};
$store = $C->{$item . "_repository"};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
${"Global::$item" . "_repository"} = {}
unless ${"Global::$item" . "_repository"};
$store = ${"Global::$item" . "_repository"};
}
my ($eval, $safe);
if ($settings =~ s/^\s*([-\w.@]+)(?:\s+)?//) {
$name = $1;
undef $eval;
$settings =~ /^\s*{/
and $settings =~ /}\s*$/
and $eval = 1;
$eval and ! $safe and $safe = new Vend::Safe;
if(! defined $store->{$name} and $item eq 'Locale') {
my $past = POSIX::setlocale(POSIX::LC_ALL);
if(POSIX::setlocale(POSIX::LC_ALL, $name) ) {
$store->{$name} = POSIX::localeconv();
}
POSIX::setlocale(POSIX::LC_ALL, $past);
}
my($sethash);
if ($eval) {
$sethash = $safe->reval($settings)
or config_warn("bad Locale setting in %s: %s", $name, $@),
$sethash = {};
}
else {
$settings =~ s/^\s+//;
$settings =~ s/\s+$//;
$sethash = {};
%{$sethash} = Text::ParseWords::shellwords($settings);
}
$c = $store->{$name} || {};
my $nodefaults = delete $sethash->{MV_LOCALE_NO_DEFAULTS};
for (keys %{$sethash}) {
$c->{$_} = $sethash->{$_};
}
}
else {
config_error("Bad locale setting $settings.\n");
}
$C->{LastLocale} = $name if $C and $item eq 'Locale';
$store->{$name} = $c unless $store->{$name};
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Options_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Options_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OptionsAttribute"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OptionsAttribute</p></div><div class="refsect1"><a id="OptionsAttribute_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="OptionsAttribute_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="OptionsAttribute_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OptionsAttribute_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="OptionsAttribute_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="OptionsAttribute_availability"></a><h2>AVAILABILITY</h2><p>OptionsAttribute is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OptionsAttribute_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_644_12361"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 644</strong></p><div class="figure-contents"><pre class="screen">
['OptionsAttribute', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OptionsAttribute_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OptionsAttribute_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OptionsEnable"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OptionsEnable — specify table and/or column for option type
</p></div><div class="refsect1"><a id="OptionsEnable_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>table</code></em>:<em class="replaceable"><code>column</code></em>
|
<em class="replaceable"><code>column</code></em>
</p></div></div><div class="refsect1"><a id="OptionsEnable_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="OptionsEnable_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OptionsEnable_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Designate_field_in_products_database_4361"></a><p class="title"><strong>Example: Designate field in products database</strong></p><div class="example-contents"><pre class="programlisting">
OptionsEnable option_type
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="OptionsEnable_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="OptionsEnable_availability"></a><h2>AVAILABILITY</h2><p>OptionsEnable is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OptionsEnable_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_643_12463"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 643</strong></p><div class="figure-contents"><pre class="screen">
['OptionsEnable', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OptionsEnable_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OptionsEnable_seeAlso"></a><h2>SEE ALSO</h2><p><a href="widgets.html#options" class="olink"><span class="citerefentry"><span class="refentrytitle">options</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OrderCleanup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OrderCleanup</p></div><div class="refsect1"><a id="OrderCleanup_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="OrderCleanup_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="OrderCleanup_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OrderCleanup_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="OrderCleanup_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="OrderCleanup_availability"></a><h2>AVAILABILITY</h2><p>OrderCleanup is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OrderCleanup_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_719_12322"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 719</strong></p><div class="figure-contents"><pre class="screen">
['OrderCleanup', 'routine_array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3777__context_shows_lines_3777_3811__12323"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3777 (context shows lines 3777-3811)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_routine_array {
my($item,$settings) = @_;
return '' unless $settings;
my $c;
if(defined $C) {
$c = $C->{$item};
}
else {
no strict 'refs';
$c = ${"Global::$item"};
}
my @mac;
if($settings =~ /^[-\s\w,]+$/) {
@mac = grep /\S/, split /[\s,]+/, $settings;
}
else {
push @mac, $settings;
}
if(ref($c) eq 'ARRAY') {
push @$c, @mac;
}
elsif($c) {
$c = [$c, @mac];
}
else {
$c = scalar(@mac) > 1 ? [ @mac ] : $mac[0];
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OrderCleanup_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OrderCleanup_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OrderCounter"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OrderCounter — specify file that keeps and increments order count
</p></div><div class="refsect1"><a id="OrderCounter_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="OrderCounter_description"></a><h2>DESCRIPTION</h2><p>Specify filename where the simple order number template is kept
(and, of course, incremented with every new order). Within the template,
the right-most number is found and incremented, preserving zero
padding, if any.
</p><p>
If the counter file is unset, then the order number will be
assigned a string in form of
<code class="literal"><em class="replaceable"><code>session_id</code></em>.<em class="replaceable"><code>unix_time</code></em></code>.
</p></div><div class="refsect1"><a id="OrderCounter_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OrderCounter_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Creating_file_etc_order_number_4577"></a><p class="title"><strong>Example: Creating file etc/order.number</strong></p><div class="example-contents"><pre class="programlisting">
#COUNTER-1.0
W-TEST-0000
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_OrderCounter_4578"></a><p class="title"><strong>Example: Setting OrderCounter</strong></p><div class="example-contents"><pre class="programlisting">
OrderCounter etc/order.number
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="OrderCounter_notes"></a><h2>NOTES</h2><p>Bear in mind that <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> provides this order number counter only as a convenience
for display, and that no internal functions depend on it. Custom order number
routines may be defined and used without fear of consequences.
</p><p>
If <code class="option">Route</code> is set to <code class="literal">supplant</code> and the
<code class="literal">counter</code> attribute is set there, this directive is ignored.
</p><p>
See <a href="glossary.html#order" class="olink">order</a> glossary entry for complete discussion of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>'s
ordering process.
</p></div><div class="refsect1"><a id="OrderCounter_availability"></a><h2>AVAILABILITY</h2><p>OrderCounter is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OrderCounter_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_618_12509"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 618</strong></p><div class="figure-contents"><pre class="screen">
['OrderCounter', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OrderCounter_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OrderCounter_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OrderLineLimit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OrderLineLimit — specify maximum number of items the user is allowed to place in the shopping cart
</p></div><div class="refsect1"><a id="OrderLineLimit_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>count</code></em> </p></div></div><div class="refsect1"><a id="OrderLineLimit_description"></a><h2>DESCRIPTION</h2><p>Specify maximum number of items that the user is allowed to place in the
shopping cart.
</p><p>
Some poorly-mannered robots may "attack" a site by following
all links one after another. Some even ignore any
<code class="filename">robots.txt</code> file that may have been created. If one of
these bad robots orders several dozen or more items, the time required to
save and restore the shopping cart from the user session may become excessive.
</p><p>
When the <code class="option">OrderLineLimit</code> is
exceeded, the command defined in <code class="option">LockoutCommand</code> will be executed and
the shopping cart will be emptied.
</p></div><div class="refsect1"><a id="OrderLineLimit_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OrderLineLimit_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_OrderLineLimit_4496"></a><p class="title"><strong>Example: Setting OrderLineLimit</strong></p><div class="example-contents"><pre class="programlisting">
OrderLineLimit 50
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="OrderLineLimit_notes"></a><h2>NOTES</h2><p>Set the directive to a number greater than the number of line items a user
is ever expected to order.
</p></div><div class="refsect1"><a id="OrderLineLimit_availability"></a><h2>AVAILABILITY</h2><p>OrderLineLimit is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OrderLineLimit_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_687_12492"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 687</strong></p><div class="figure-contents"><pre class="screen">
['OrderLineLimit', 'integer', 0],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3965__context_shows_lines_3965_3972__12493"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3965 (context shows lines 3965-3972)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_integer {
my($var, $value) = @_;
$value = hex($value) if $value =~ /^0x[\dA-Fa-f]+$/;
$value = oct($value) if $value =~ /^0[0-7]+$/;
config_error("The $var directive (now set to '$value') must be an integer\n")
unless $value =~ /^\d+$/;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OrderLineLimit_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OrderLineLimit_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RobotLimit" title="RobotLimit"><span class="citerefentry"><span class="refentrytitle">RobotLimit</span>(7ic)</span></a>, <a class="link" href="#LockoutCommand" title="LockoutCommand"><span class="citerefentry"><span class="refentrytitle">LockoutCommand</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OrderProfile"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OrderProfile — specify files containing order profile definitions
</p></div><div class="refsect1"><a id="OrderProfile_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em>... </p></div></div><div class="refsect1"><a id="OrderProfile_description"></a><h2>DESCRIPTION</h2><p>Specify filenames that contain <a href="glossary.html#profile" class="olink">profile</a> definitions.
</p></div><div class="refsect1"><a id="OrderProfile_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OrderProfile_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_OrderProfile_4452"></a><p class="title"><strong>Example: Defining OrderProfile</strong></p><div class="example-contents"><pre class="programlisting">
OrderProfile etc/profiles.order etc/profiles.login
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Dedicated_directory_for_profile_definitions_4453"></a><p class="title"><strong>Example: Dedicated directory for profile definitions</strong></p><div class="example-contents"><p>A wildcard can be used instead of listing the files individually. Beware of editor working files, backup files, etc., that would be included with a broad file-matching glob of * even though that would be easiest. It's safer to use something like a uniform .profile suffix as in this example:</p><pre class="programlisting">
OrderProfile profiles/*.profile
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="OrderProfile_notes"></a><h2>NOTES</h2><p>The actions defined in order profiles can also be used for
<code class="literal">mv_click</code> actions
if the actions are not defined in <a href="glossary.html#scratch" class="olink">scratch</a> space. They are accessed by
setting the <code class="mv">mv_order_profile</code> variable to the name of the order
profile.
</p><p>
For the complete discussion, please see the <a href="glossary.html#profile" class="olink">profile</a> glossary entry.
</p></div><div class="refsect1"><a id="OrderProfile_availability"></a><h2>AVAILABILITY</h2><p>OrderProfile is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OrderProfile_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_693_12482"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 693</strong></p><div class="figure-contents"><pre class="screen">
['OrderProfile', 'profile', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4789__context_shows_lines_4789_4830__12483"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4789 (context shows lines 4789-4830)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_profile {
my ($var, $value) = @_;
my ($c, $ref, $sref, $i);
if($C) {
$C->{"${var}Name"} = {} if ! $C->{"${var}Name"};
$sref = $C->{Source};
$ref = $C->{"${var}Name"};
$c = $C->{$var} || [];
}
else {
no strict 'refs';
$sref = $Global::Source;
${"Global::${var}Name"} = {}
if ! ${"Global::${var}Name"};
$ref = ${"Global::${var}Name"};
$c = ${"Global::$var"} || [];
}
$sref->{$var} = $value;
my (@files) = glob($value);
for(@files) {
next unless $_;
config_error(
"No leading / allowed if NoAbsolute set. Contact administrator.\n")
if m.^/. and $Global::NoAbsolute;
config_error(
"No leading ../.. allowed if NoAbsolute set. Contact administrator.\n")
if m#^\.\./.*\.\.# and $Global::NoAbsolute;
push @$c, (split /\s*[\r\n]+__END__[\r\n]+\s*/, readfile($_));
}
for($i = 0; $i < @$c; $i++) {
if($c->[$i] =~ s/(^|\n)__NAME__\s+([^\n\r]+)\r?\n/$1/) {
my $name = $2;
$name =~ s/\s+$//;
$ref->{$name} = $i;
}
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OrderProfile_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OrderProfile_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Profiles" title="Profiles"><span class="citerefentry"><span class="refentrytitle">Profiles</span>(7ic)</span></a>, <a class="link" href="#SearchProfile" title="SearchProfile"><span class="citerefentry"><span class="refentrytitle">SearchProfile</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="OrderReport"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>OrderReport — specify location of the order report form
</p></div><div class="refsect1"><a id="OrderReport_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="OrderReport_description"></a><h2>DESCRIPTION</h2><p>Specify location of the simple order report file.
</p></div><div class="refsect1"><a id="OrderReport_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="OrderReport_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_OrderReport_3773"></a><p class="title"><strong>Example: Setting OrderReport</strong></p><div class="example-contents"><pre class="programlisting">
OrderReport etc/report
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="OrderReport_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="OrderReport_availability"></a><h2>AVAILABILITY</h2><p>OrderReport is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="OrderReport_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_577_12324"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 577</strong></p><div class="figure-contents"><pre class="screen">
['OrderReport', undef, 'etc/report'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="OrderReport_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="OrderReport_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Profiles" title="Profiles"><span class="citerefentry"><span class="refentrytitle">Profiles</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PGP"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PGP — encrypt complete order reports automatically
</p></div><div class="refsect1"><a id="PGP_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> [<em class="replaceable"><code>arguments</code></em>]</p></div></div><div class="refsect1"><a id="PGP_description"></a><h2>DESCRIPTION</h2><p>The directive enables automatic encryption of complete order
reports sent to the store owner or an e-mail processing system.
</p><p>
The PGP key ring must be in the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> daemon user's home directory,
or defined in the environment variable <code class="envar">PGPPATH</code>.
The target user's public key must be present in the keyring, of course.
</p></div><div class="refsect1"><a id="PGP_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PGP_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_PGP_3780"></a><p class="title"><strong>Example: Defining PGP</strong></p><div class="example-contents"><pre class="programlisting">
PGP /usr/local/bin/pgp -feat orders@company.com
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PGP_notes"></a><h2>NOTES</h2><p>If this directive is non-null, the PGP command string will be used as-given
to encrypt the entire order, in addition to any encryption done as a result
of the <code class="option">CreditCardAuto</code> directive. If, for some reason, an error comes
from PGP, the customer will see <a href="glossary.html#special" class="olink">special</a> page
"<code class="literal">failed</code>".
</p><p>
If the <code class="option">Route</code> directive is set up to "<code class="literal">supplant</code>",
the <code class="option">PGP</code> directive is ignored.
</p></div><div class="refsect1"><a id="PGP_availability"></a><h2>AVAILABILITY</h2><p>PGP is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PGP_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_602_12325"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 602</strong></p><div class="figure-contents"><pre class="screen">
['PGP', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PGP_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PGP_seeAlso"></a><h2>SEE ALSO</h2><p><a href="vars.html#GPG_PATH" class="olink"><span class="citerefentry"><span class="refentrytitle">GPG_PATH</span>(7ic)</span></a>, <a class="link" href="#CreditCardAuto" title="CreditCardAuto"><span class="citerefentry"><span class="refentrytitle">CreditCardAuto</span>(7ic)</span></a>, <a href="filters.html#encrypt" class="olink"><span class="citerefentry"><span class="refentrytitle">encrypt</span>(7ic)</span></a>, <a class="link" href="#EncryptProgram" title="EncryptProgram"><span class="citerefentry"><span class="refentrytitle">EncryptProgram</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PIDcheck"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PIDcheck — check running Interchange processes during the HouseKeeping routine
</p></div><div class="refsect1"><a id="PIDcheck_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <code class="literal">0</code> | <em class="replaceable"><code>interval</code></em> </p></div></div><div class="refsect1"><a id="PIDcheck_description"></a><h2>DESCRIPTION</h2><p>If set to a positive non-zero value, enables check of running
Interchange processes during the <code class="option">HouseKeeping</code> routine.
</p><p>
If a process has been running (or is hung) for longer than the
specified <a href="glossary.html#interval" class="olink">interval</a>, then <strong class="userinput"><code>kill -9</code></strong> will
be issued and the server count decremented.
</p><p>
Interchange also logs this incident in the global error log file. The log
line looks like this example:
<span class="errortext">hammered PID 21429 running 312 seconds</span>.
</p></div><div class="refsect1"><a id="PIDcheck_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="PIDcheck_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_PIDcheck_2477"></a><p class="title"><strong>Example: Setting PIDcheck</strong></p><div class="example-contents"><pre class="programlisting">
PIDcheck 300
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_PIDcheck_in_time_interval_other_than_seconds_2478"></a><p class="title"><strong>Example: Setting PIDcheck in time interval other than seconds</strong></p><div class="example-contents"><pre class="programlisting">
PIDcheck 5 minutes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PIDcheck_notes"></a><h2>NOTES</h2><p>If you have long-running database builds, this directive needs to stay
disabled, or set to a high value (of perhaps <code class="literal">600</code>, or
<code class="literal">10 minutes</code>), or use the <span class="command"><strong>bin/offline</strong></span>
script.
</p></div><div class="refsect1"><a id="PIDcheck_availability"></a><h2>AVAILABILITY</h2><p>PIDcheck is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PIDcheck_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_490_11969"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 490</strong></p><div class="figure-contents"><pre class="screen">
['PIDcheck', 'time', '0'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4088__context_shows_lines_4088_4100__11970"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4088 (context shows lines 4088-4100)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_time {
my($var, $value) = @_;
my($n);
return $value unless $value;
# $C->{Source}->{$var} = [$value];
$n = time_to_seconds($value);
config_error("Bad time format ('$value') in the $var directive\n")
unless defined $n;
$n;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PIDcheck_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PIDcheck_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#HouseKeeping" title="HouseKeeping"><span class="citerefentry"><span class="refentrytitle">HouseKeeping</span>(7ic)</span></a>, <a class="link" href="#PIDfile" title="PIDfile"><span class="citerefentry"><span class="refentrytitle">PIDfile</span>(7ic)</span></a>, <a class="link" href="#MaxRequestsPerChild" title="MaxRequestsPerChild"><span class="citerefentry"><span class="refentrytitle">MaxRequestsPerChild</span>(7ic)</span></a>, <a class="link" href="#MaxServers" title="MaxServers"><span class="citerefentry"><span class="refentrytitle">MaxServers</span>(7ic)</span></a>, <a class="link" href="#ChildLife" title="ChildLife"><span class="citerefentry"><span class="refentrytitle">ChildLife</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PIDfile"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PIDfile — PID filename
</p></div><div class="refsect1"><a id="PIDfile_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em> </p></div></div><div class="refsect1"><a id="PIDfile_description"></a><h2>DESCRIPTION</h2><p>Specify the filename that will contain Interchange server process ID. As with
most Unix daemons, this is an elegant way to determine which process should
be sent a signal for stopping or reconfiguring the server.
</p><p>
The location must be writable by the Interchange daemon.
</p></div><div class="refsect1"><a id="PIDfile_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="PIDfile_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_PIDfile_2674"></a><p class="title"><strong>Example: Setting PIDfile</strong></p><div class="example-contents"><pre class="programlisting">
PIDfile /var/run/interchange/interchange.pid
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PIDfile_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PIDfile_availability"></a><h2>AVAILABILITY</h2><p>PIDfile is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PIDfile_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_441_12023"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 441</strong></p><div class="figure-contents"><pre class="screen">
['PIDfile', 'root_dir', "etc/$Global::ExeName.pid"],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3898__context_shows_lines_3898_3905__12024"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3898 (context shows lines 3898-3905)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_root_dir {
my($var, $value) = @_;
return '' unless $value;
$value = "$Global::VendRoot/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
return $value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PIDfile_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PIDfile_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#PIDcheck" title="PIDcheck"><span class="citerefentry"><span class="refentrytitle">PIDcheck</span>(7ic)</span></a>, <a class="link" href="#MaxRequestsPerChild" title="MaxRequestsPerChild"><span class="citerefentry"><span class="refentrytitle">MaxRequestsPerChild</span>(7ic)</span></a>, <a class="link" href="#MaxServers" title="MaxServers"><span class="citerefentry"><span class="refentrytitle">MaxServers</span>(7ic)</span></a>, <a class="link" href="#ChildLife" title="ChildLife"><span class="citerefentry"><span class="refentrytitle">ChildLife</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PageDir"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PageDir — specify directory containing catalog pages
</p></div><div class="refsect1"><a id="PageDir_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory_name</code></em> </p></div></div><div class="refsect1"><a id="PageDir_description"></a><h2>DESCRIPTION</h2><p>Specify the directory containing <a href="glossary.html#catalog" class="olink">catalog</a> pages. The default for this
directive is <code class="literal">pages</code>.
</p><p>
Speaking of <a href="glossary.html#internationalization" class="olink">internationalization</a>, it can be useful to set this
directive to
different values, depending on current <a href="glossary.html#locale" class="olink">locale</a>.
</p></div><div class="refsect1"><a id="PageDir_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PageDir_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_PageDir_4177"></a><p class="title"><strong>Example: Setting PageDir</strong></p><div class="example-contents"><pre class="programlisting">
PageDir html
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_PageDir_depending_on_current_locale_4178"></a><p class="title"><strong>Example: Setting PageDir depending on current locale</strong></p><div class="example-contents"><p>To use a different page directory for different locales, say French and
English, help yourself with the robust <code class="option">Locale</code> directive:</p><pre class="programlisting">
# Establish the default at startup
PageDir english
# Establish locale-dependent directories
Locale fr_FR PageDir francais
Locale en_US PageDir english
</pre><p>
To fully understand the example and implicitly presented <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> features, make
sure you're familiar with <a href="glossary.html#internationalization" class="olink">internationalization</a> and <a href="glossary.html#locale" class="olink">locale</a>
glossary
entries.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="PageDir_notes"></a><h2>NOTES</h2><p>The specified location is always treated relative to <a href="glossary.html#CATROOT" class="olink">CATROOT</a>.
</p></div><div class="refsect1"><a id="PageDir_availability"></a><h2>AVAILABILITY</h2><p>PageDir is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PageDir_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_539_12412"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 539</strong></p><div class="figure-contents"><pre class="screen">
['PageDir', 'relative_dir', 'pages'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3948__context_shows_lines_3948_3962__12413"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3948 (context shows lines 3948-3962)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_relative_dir {
my($var, $value) = @_;
if (absolute_or_relative($value)) {
config_error('Path %s not allowed in %s directive',
$value, $var);
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PageDir_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PageDir_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RunDir" title="RunDir"><span class="citerefentry"><span class="refentrytitle">RunDir</span>(7ic)</span></a>, <a class="link" href="#Locale" title="Locale"><span class="citerefentry"><span class="refentrytitle">Locale</span>(7ic)</span></a>, <a class="link" href="#ScratchDir" title="ScratchDir"><span class="citerefentry"><span class="refentrytitle">ScratchDir</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PageSelectField"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PageSelectField — specify products database column used to select the flypage
</p></div><div class="refsect1"><a id="PageSelectField_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>column_name</code></em> </p></div></div><div class="refsect1"><a id="PageSelectField_description"></a><h2>DESCRIPTION</h2><p>The directive sets a <span class="database">products</span> database column
which can be used to
select the on-the-fly template page (the <a href="glossary.html#flypage" class="olink">flypage</a>). This allows
multiple flypages to be defined and selected automatically. If the field
is empty (no spaces!), the default, <code class="literal">flypage</code>, will be used.
</p></div><div class="refsect1"><a id="PageSelectField_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PageSelectField_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_PageSelectField_3703"></a><p class="title"><strong>Example: Setting PageSelectField</strong></p><div class="example-contents"><pre class="programlisting">
PageSelectField display_page
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PageSelectField_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PageSelectField_availability"></a><h2>AVAILABILITY</h2><p>PageSelectField is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PageSelectField_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_666_12305"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 666</strong></p><div class="figure-contents"><pre class="screen">
['PageSelectField', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PageSelectField_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PageSelectField_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PageTableMap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PageTableMap — map field names for page lookup tables
</p></div><div class="refsect1"><a id="PageTableMap_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="PageTableMap_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="PageTableMap_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PageTableMap_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="PageTableMap_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PageTableMap_availability"></a><h2>AVAILABILITY</h2><p>PageTableMap is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PageTableMap_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_559__context_shows_lines_549_555__12277"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 559 (context shows lines 549-555)</strong></p><div class="figure-contents"><pre class="screen">
['PageTableMap', 'hash', qq{
expiration_date expiration_date
show_date show_date
page_text page_text
base_page base_page
code code
}],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3177__context_shows_lines_3177_3194__12278"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3177 (context shows lines 3177-3194)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PageTableMap_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PageTableMap_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PageTables"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PageTables</p></div><div class="refsect1"><a id="PageTables_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="PageTables_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="PageTables_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PageTables_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="PageTables_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PageTables_availability"></a><h2>AVAILABILITY</h2><p>PageTables is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PageTables_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_558_12272"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 558</strong></p><div class="figure-contents"><pre class="screen">
['PageTables', 'array_complete', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3813__context_shows_lines_3813_3826__12273"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3813 (context shows lines 3813-3826)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_array_complete {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c = [];
for (@setting) {
check_legal($item, $_);
push @{$c}, $_;
}
$c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PageTables_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PageTables_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ParseVariables"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ParseVariables — parse (interpolate) config file variables
</p></div><div class="refsect1"><a id="ParseVariables_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="ParseVariables_description"></a><h2>DESCRIPTION</h2><p>Specify whether the <a href="glossary.html#configuration" class="olink">configuration</a> directives should have their
values parsed (<a href="glossary.html#interpolate" class="olink">interpolate</a>d).
</p><p>
This applies to all configuration directives except <code class="option">Variable</code>.
</p><p>
Of variables, only those in ALL CAPS are interpolated.
</p></div><div class="refsect1"><a id="ParseVariables_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ParseVariables_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_ParseVariables_globally_3673"></a><p class="title"><strong>Example: Enabling ParseVariables globally</strong></p><div class="example-contents"><pre class="programlisting">
ParseVariables 1
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Defining_a_variable_containing_parse_needing_data_3674"></a><p class="title"><strong>Example: Defining a variable containing parse-needing data</strong></p><div class="example-contents"><pre class="programlisting">
Variable STORE_ID topshop
ParseVariables Yes
StaticDir /home/__STORE_ID__/www/cat
ParseVariables No
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ParseVariables_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ParseVariables_availability"></a><h2>AVAILABILITY</h2><p>ParseVariables is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ParseVariables_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_567_12299"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 567</strong></p><div class="figure-contents"><pre class="screen">
['ParseVariables', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12300"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ParseVariables_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ParseVariables_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Password"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Password — specify password for RemoteUser
</p></div><div class="refsect1"><a id="Password_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>password</code></em> </p></div></div><div class="refsect1"><a id="Password_description"></a><h2>DESCRIPTION</h2><p>Password that will cause internal authorization checks for <code class="option">RemoteUser</code>
to allow access.
</p><p>
The password must be encrypted, unless <code class="varname">MV_NO_CRYPT</code> is
enabled.
</p></div><div class="refsect1"><a id="Password_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Password_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_Password_with_an_encrypted_string_corresponding_to_a_blank_password_3596"></a><p class="title"><strong>Example: Setting Password with an encrypted string corresponding to a blank password</strong></p><div class="example-contents"><pre class="programlisting">
Password bAWoVkuzphOX.
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Password_notes"></a><h2>NOTES</h2><p>The encrypted password is a standard Unix crypt, which you can obtain either
using <span class="command"><strong>makepasswd --crypt</strong></span> or indirectly
using <span class="command"><strong>htpasswd</strong></span>, or invoking
<span class="command"><strong>perl -le'print crypt("mypasswd","AA")'</strong></span>,
where <code class="literal">mypasswd</code> is the desired password and
<code class="literal">AA</code> are two random characters called
the <a href="glossary.html#salt" class="olink">salt</a>.
</p><p>
See <code class="varname">MV_NO_CRYPT</code> and <code class="sgmltag-element">crypt</code> for more discussion.
See <a href="glossary.html#crypt" class="olink">crypt</a> glossary entry for complete information on crypto
algorithms used and ways to generate encrypted strings.
</p></div><div class="refsect1"><a id="Password_availability"></a><h2>AVAILABILITY</h2><p>Password is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Password_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_647_12279"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 647</strong></p><div class="figure-contents"><pre class="screen">
['Password', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Password_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Password_seeAlso"></a><h2>SEE ALSO</h2><p><a href="vars.html#MV_NO_CRYPT" class="olink"><span class="citerefentry"><span class="refentrytitle">MV_NO_CRYPT</span>(7ic)</span></a>, <a href="tags.html#crypt" class="olink"><span class="citerefentry"><span class="refentrytitle">crypt</span>(7ic)</span></a>, <a class="link" href="#RemoteUser" title="RemoteUser"><span class="citerefentry"><span class="refentrytitle">RemoteUser</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PerlAlwaysGlobal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PerlAlwaysGlobal</p></div><div class="refsect1"><a id="PerlAlwaysGlobal_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="PerlAlwaysGlobal_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="PerlAlwaysGlobal_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="PerlAlwaysGlobal_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="PerlAlwaysGlobal_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PerlAlwaysGlobal_availability"></a><h2>AVAILABILITY</h2><p>PerlAlwaysGlobal is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PerlAlwaysGlobal_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_497_12155"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 497</strong></p><div class="figure-contents"><pre class="screen">
['PerlAlwaysGlobal', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12156"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PerlAlwaysGlobal_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PerlAlwaysGlobal_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PerlNoStrict"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PerlNoStrict</p></div><div class="refsect1"><a id="PerlNoStrict_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="PerlNoStrict_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="PerlNoStrict_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="PerlNoStrict_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="PerlNoStrict_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PerlNoStrict_availability"></a><h2>AVAILABILITY</h2><p>PerlNoStrict is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PerlNoStrict_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_496_12106"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 496</strong></p><div class="figure-contents"><pre class="screen">
['PerlNoStrict', 'boolean', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3002__context_shows_lines_3002_3019__12107"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3002 (context shows lines 3002-3019)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean {
my($item,$settings) = @_;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
$c->{$_} = 1;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PerlNoStrict_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PerlNoStrict_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PermanentDir"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PermanentDir — specify directory containing temporary files for permanent searches
</p></div><div class="refsect1"><a id="PermanentDir_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory_name</code></em> </p></div></div><div class="refsect1"><a id="PermanentDir_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="PermanentDir_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PermanentDir_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Relocate_to__conf_ScratchDir__4267"></a><p class="title"><strong>Example: Relocate to <code class="option">ScratchDir</code></strong></p><div class="example-contents"><pre class="programlisting">
PermanentDir tmp/perm
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PermanentDir_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PermanentDir_availability"></a><h2>AVAILABILITY</h2><p>PermanentDir is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PermanentDir_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_579_12438"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 579</strong></p><div class="figure-contents"><pre class="screen">
['PermanentDir', 'relative_dir', 'perm'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3948__context_shows_lines_3948_3962__12439"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3948 (context shows lines 3948-3962)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_relative_dir {
my($var, $value) = @_;
if (absolute_or_relative($value)) {
config_error('Path %s not allowed in %s directive',
$value, $var);
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PermanentDir_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PermanentDir_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PostURL"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PostURL — specify URL for POST requests
</p></div><div class="refsect1"><a id="PostURL_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>URL</code></em> </p></div></div><div class="refsect1"><a id="PostURL_description"></a><h2>DESCRIPTION</h2><p>The directive specifies a catalog URL for POST form submissions.
</p><p>
This allows an automatically different path for GET and POST
requests, presuming you use the <code class="sgmltag-element">process</code> tag as
form action target.
</p></div><div class="refsect1"><a id="PostURL_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PostURL_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_PostURL_4345"></a><p class="title"><strong>Example: Setting PostURL</strong></p><div class="example-contents"><p>Put the following lines in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
VendURL http://myhost.mydomain.local/
SecureURL https://myhost.mydomain.local/
PostURL http://myhost.mydomain.local/cgi-bin/standard
SecurePostURL https://myhost.mydomain.local/cgi-bin/standard
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PostURL_notes"></a><h2>NOTES</h2><p><code class="option">PostURL</code> value can also be a relative path, with or without the
protocol and hostname specification.
</p></div><div class="refsect1"><a id="PostURL_availability"></a><h2>AVAILABILITY</h2><p>PostURL is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PostURL_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_573_12457"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 573</strong></p><div class="figure-contents"><pre class="screen">
['PostURL', 'url', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3975__context_shows_lines_3975_3979__12458"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3975 (context shows lines 3975-3979)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_url {
my($var, $value) = @_;
$value =~ s,/+$,,;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PostURL_authors"></a><h2>AUTHORS</h2><p>Mike Heins
</p></div><div class="refsect1"><a id="PostURL_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#SecurePostURL" title="SecurePostURL"><span class="citerefentry"><span class="refentrytitle">SecurePostURL</span>(7ic)</span></a>, <a class="link" href="#VendURL" title="VendURL"><span class="citerefentry"><span class="refentrytitle">VendURL</span>(7ic)</span></a>, <a class="link" href="#SecureURL" title="SecureURL"><span class="citerefentry"><span class="refentrytitle">SecureURL</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Pragma"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Pragma — specify pragma's default value
</p></div><div class="refsect1"><a id="Pragma_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>pragma_name</code></em> [=<em class="replaceable"><code>value</code></em>]</p></div></div><div class="refsect1"><a id="Pragma_description"></a><h2>DESCRIPTION</h2><p>The directive enables specified Interchange <a href="glossary.html#pragma" class="olink">pragma</a> by
setting it to "<code class="literal">1</code>" or a user-supplied value.
</p></div><div class="refsect1"><a id="Pragma_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Pragma_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling__dynamic_variables__pragma_4556"></a><p class="title"><strong>Example: Enabling 'dynamic_variables' pragma</strong></p><div class="example-contents"><pre class="programlisting">
Pragma dynamic_variables
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Disabling__dynamic_variables__pragma_4557"></a><p class="title"><strong>Example: Disabling 'dynamic_variables' pragma</strong></p><div class="example-contents"><pre class="programlisting">
Pragma dynamic_variables=0
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting__init_page__pragma_to_a_specific_value_4558"></a><p class="title"><strong>Example: Setting 'init_page' pragma to a specific value</strong></p><div class="example-contents"><pre class="programlisting">
Pragma init_page=myInitRoutine
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Pragma_notes"></a><h2>NOTES</h2><p>Please see the <a href="glossary.html#pragma" class="olink">pragma</a> glossary entry for complete information.
</p></div><div class="refsect1"><a id="Pragma_availability"></a><h2>AVAILABILITY</h2><p>Pragma is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Pragma_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_635_12504"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 635</strong></p><div class="figure-contents"><pre class="screen">
['Pragma', 'boolean_value', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3022__context_shows_lines_3022_3047__12505"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3022 (context shows lines 3022-3047)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_boolean_value {
my($item,$settings) = @_;
my(@setting) = split /[\s,]+/, $settings;
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
for (@setting) {
my ($k,$v);
if(/=/) {
($k,$v) = split /=/, $_, 2;
}
else {
$k = $_;
$v = 1;
}
$c->{$k} = $v;
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Pragma_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Pragma_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#tag" class="olink"><span class="citerefentry"><span class="refentrytitle">tag</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PreFork"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PreFork — specify whether Interchange server should pre-fork processes that wait for client connections
</p></div><div class="refsect1"><a id="PreFork_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="PreFork_description"></a><h2>DESCRIPTION</h2><p>For each new client connection, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> must spawn a new process that will
handle communication with the client.
By using <code class="option">PreFork</code>, it is possible to <span class="emphasis"><em>pre-fork</em></span>
(or in other words, "start ahead of time") some number of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> servers
that will be ready to serve client requests immediately as they come in.
</p><p>
If you're running PreFork, you should use it in combination with
<code class="option">PreForkSingleFork</code>, to create the absolute minimal number of forks
necessary. Only turn <code class="option">PreForkSingleFork</code> off
if it causes zombie processes to pile up.
</p><p>
This method reduces system overhead due to forking and is the fastest and
best way to run a busy <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server.
</p></div><div class="refsect1"><a id="PreFork_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="PreFork_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_PreFork_3300"></a><p class="title"><strong>Example: Enabling PreFork</strong></p><div class="example-contents"><pre class="programlisting">
PreFork yes
PreForkSingleFork yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PreFork_notes"></a><h2>NOTES</h2><p>Regardless of the <code class="option">PreFork</code> setting, each spawned server will serve
<code class="option">MaxRequestsPerChild</code> requests, before being shut down and respawned.
(This technique is used to prevent any memory leaks).
</p><p>
For an introduction to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> run modes and practical implications, please
see the <a href="glossary.html#ic-run-mode" class="olink">ic run mode</a> glossary entry.
</p></div><div class="refsect1"><a id="PreFork_availability"></a><h2>AVAILABILITY</h2><p>PreFork is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PreFork_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_451_12189"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 451</strong></p><div class="figure-contents"><pre class="screen">
['PreFork', 'yesno', 0],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12190"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PreFork_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PreFork_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#ChildLife" title="ChildLife"><span class="citerefentry"><span class="refentrytitle">ChildLife</span>(7ic)</span></a>, <a class="link" href="#StartServers" title="StartServers"><span class="citerefentry"><span class="refentrytitle">StartServers</span>(7ic)</span></a>, <a class="link" href="#PreForkSingleFork" title="PreForkSingleFork"><span class="citerefentry"><span class="refentrytitle">PreForkSingleFork</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PreForkSingleFork"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PreForkSingleFork — perform one instead of two forks in PreFork mode
</p></div><div class="refsect1"><a id="PreForkSingleFork_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="PreForkSingleFork_description"></a><h2>DESCRIPTION</h2><p>This directive affects <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> behavior in conjunction with
<code class="option">PreFork</code>, by using one instead of two <code class="function">fork()</code>
calls to prefork a server.
</p><p>
If you are running <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> in prefork mode, you should use it in combination with
this directive. Only turn <code class="option">PreForkSingleFork</code> off if it causes zombie
processes to pile up on your system.
</p><p>
This method reduces system overhead when forking and is the fastest and
best way to run a busy <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> server.
</p></div><div class="refsect1"><a id="PreForkSingleFork_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="PreForkSingleFork_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_PreForkSingleFork_2550"></a><p class="title"><strong>Example: Enabling PreForkSingleFork</strong></p><div class="example-contents"><pre class="programlisting">
PreFork yes
PreForkSingleFork yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PreForkSingleFork_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PreForkSingleFork_availability"></a><h2>AVAILABILITY</h2><p>PreForkSingleFork is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PreForkSingleFork_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_452_11989"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 452</strong></p><div class="figure-contents"><pre class="screen">
['PreForkSingleFork', 'yesno', 0],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__11990"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PreForkSingleFork_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PreForkSingleFork_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#StartServers" title="StartServers"><span class="citerefentry"><span class="refentrytitle">StartServers</span>(7ic)</span></a>, <a class="link" href="#PreFork" title="PreFork"><span class="citerefentry"><span class="refentrytitle">PreFork</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Preload"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Preload — specify macro to be executed at the very beginning of every request
</p></div><div class="refsect1"><a id="Preload_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>macro</code></em> </p></div></div><div class="refsect1"><a id="Preload_description"></a><h2>DESCRIPTION</h2><p>This is just like <code class="option">Autoload</code> as it executes an Interchange <a href="glossary.html#macro" class="olink">macro</a>
but runs at the earliest possible stage of request processing, which
allows tweaking the session, path, robot status, cookie handling,
authorization, etc.
</p></div><div class="refsect1"><a id="Preload_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Preload_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Simple_Preload_example_4281"></a><p class="title"><strong>Example: Simple Preload example</strong></p><div class="example-contents"><p>This example shows how to not create a session for any but explicitly listed URL prefixes.
</p><p>
Put the following in <code class="filename">interchange.cfg</code>:</p><pre class="programlisting">
GlobalSub <<EOR
sub skip_session {
$CGI::values{mv_tmp_session} = 1
if $CGI::path_info =~ m{\A/(?:aboutus|contact|info)};
return;
}
EOR
</pre><p>
Put the following in <code class="filename">catalog.cfg</code>:</p><pre class="programlisting">
Preload skip_session
</pre><p>
For diagnostic purposes, you can put a footer in your bottom page
template to show the current session ID:</p><pre class="programlisting">
session ID=[data session id]
</pre><p>
Restart Interchange, then visit various pages. Whenever you visit a page
whose path starts with "aboutus", "contact", or "info", no session will
be assigned, which you can verify by looking at your diagnostic output
at the bottom of the page. This can be useful if you require cookies for
session access, and don't want to incur the overhead of session access
on pages that don't need it.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="Preload_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Preload_availability"></a><h2>AVAILABILITY</h2><p>Preload is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Preload_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_590_12441"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 590</strong></p><div class="figure-contents"><pre class="screen">
['Preload', 'routine_array', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3777__context_shows_lines_3777_3811__12442"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3777 (context shows lines 3777-3811)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_routine_array {
my($item,$settings) = @_;
return '' unless $settings;
my $c;
if(defined $C) {
$c = $C->{$item};
}
else {
no strict 'refs';
$c = ${"Global::$item"};
}
my @mac;
if($settings =~ /^[-\s\w,]+$/) {
@mac = grep /\S/, split /[\s,]+/, $settings;
}
else {
push @mac, $settings;
}
if(ref($c) eq 'ARRAY') {
push @$c, @mac;
}
elsif($c) {
$c = [$c, @mac];
}
else {
$c = scalar(@mac) > 1 ? [ @mac ] : $mac[0];
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Preload_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Preload_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AutoEnd" title="AutoEnd"><span class="citerefentry"><span class="refentrytitle">AutoEnd</span>(7ic)</span></a>, <a class="link" href="#Autoload" title="Autoload"><span class="citerefentry"><span class="refentrytitle">Autoload</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PriceCommas"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PriceCommas — show thousands separator in price pictures
</p></div><div class="refsect1"><a id="PriceCommas_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> Yes | No </p></div></div><div class="refsect1"><a id="PriceCommas_description"></a><h2>DESCRIPTION</h2><p>The directive specifies whether <code class="literal">mon_thousands_sep</code>
(specified as part of <code class="option">Locale</code>) will be used in currency formatting
for display.
</p><p>
If no commas are desired in price numbers (for the <code class="literal">item-price</code> tag etc.),
disable this directive.
</p><p>
Despite the possibly misleading directive name, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> does not always insert
a comma ("<code class="literal">,</code>") but a proper <a href="glossary.html#locale" class="olink">locale</a>-equivalent of it.
</p></div><div class="refsect1"><a id="PriceCommas_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PriceCommas_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Disabling_PriceCommas_4128"></a><p class="title"><strong>Example: Disabling PriceCommas</strong></p><div class="example-contents"><pre class="programlisting">
PriceCommas 0
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_PriceCommas_depending_on_current_locale_4129"></a><p class="title"><strong>Example: Setting PriceCommas depending on current locale</strong></p><div class="example-contents"><pre class="programlisting">
# Establish a default
PriceCommas 1
# Establish locale-specific price commas
Locale fr_FR PriceCommas 0
Locale en_US PriceCommas 1
</pre><p>
To fully understand the example and implicitly presented <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> features, make
sure you're familiar with <a href="glossary.html#internationalization" class="olink">internationalization</a> and <a href="glossary.html#locale" class="olink">locale</a>
glossary
entries.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="PriceCommas_notes"></a><h2>NOTES</h2><p>This directive is overridden by eventual
<code class="option">Locale</code> <code class="literal">price_picture</code> definition.
</p></div><div class="refsect1"><a id="PriceCommas_availability"></a><h2>AVAILABILITY</h2><p>PriceCommas is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PriceCommas_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_642_12401"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 642</strong></p><div class="figure-contents"><pre class="screen">
['PriceCommas', 'yesno', 'Yes'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12402"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PriceCommas_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PriceCommas_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#currency" class="olink"><span class="citerefentry"><span class="refentrytitle">currency</span>(7ic)</span></a>, <a class="link" href="#Locale" title="Locale"><span class="citerefentry"><span class="refentrytitle">Locale</span>(7ic)</span></a>, <a class="link" href="#PriceField" title="PriceField"><span class="citerefentry"><span class="refentrytitle">PriceField</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PriceDefault"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PriceDefault — specify default price field in chained pricing schemes
</p></div><div class="refsect1"><a id="PriceDefault_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>field_name</code></em> </p></div></div><div class="refsect1"><a id="PriceDefault_description"></a><h2>DESCRIPTION</h2><p>When chained <a href="glossary.html#price" class="olink">price</a> scheme is used and a specification of
<code class="literal"><em class="replaceable"><code>table</code></em>:<em class="replaceable"><code>field</code></em>:<em class="replaceable"><code>key</code></em></code> is given without explicit
<code class="literal">:<em class="replaceable"><code>field</code></em></code>, the value in
<code class="option">PriceDefault</code> will be used.
</p><p>
The default value is <code class="literal">price</code>.
</p></div><div class="refsect1"><a id="PriceDefault_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PriceDefault_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_PriceDefault_4088"></a><p class="title"><strong>Example: Setting PriceDefault</strong></p><div class="example-contents"><pre class="programlisting">
PriceDefault price
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="PriceDefault_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="PriceDefault_availability"></a><h2>AVAILABILITY</h2><p>PriceDefault is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PriceDefault_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_698_12392"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 698</strong></p><div class="figure-contents"><pre class="screen">
['PriceDefault', undef, 'price'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PriceDefault_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PriceDefault_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#PriceField" title="PriceField"><span class="citerefentry"><span class="refentrytitle">PriceField</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PriceDivide"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PriceDivide — specify number to divide the price by, to obtain price in units
</p></div><div class="refsect1"><a id="PriceDivide_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>number</code></em> </p></div></div><div class="refsect1"><a id="PriceDivide_description"></a><h2>DESCRIPTION</h2><p>The number the price should be divided by, to get the price in base units
(dollars or such).
</p><p>
For example, if you keep your prices specified in pennies (100th part of a
dollar), set the directive to <code class="literal">100</code>.
</p></div><div class="refsect1"><a id="PriceDivide_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PriceDivide_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_PriceDivide_3898"></a><p class="title"><strong>Example: Setting PriceDivide</strong></p><div class="example-contents"><pre class="programlisting">
PriceDivide 100
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_PriceDivide_depending_on_current_locale_3899"></a><p class="title"><strong>Example: Setting PriceDivide depending on current locale</strong></p><div class="example-contents"><pre class="programlisting">
# (Default is PriceDivide 1, so no special setting required)
#PriceDivide 1
# Establish locale-specific price division
Locale fr_FR PriceDivide .20
</pre><p>
The following would make prices expressed in French francs five times
higher than corresponding dollar amounts.
</p><p>
To fully understand the example and implicitly presented <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> features, make
sure you're familiar with <a href="glossary.html#internationalization" class="olink">internationalization</a> and <a href="glossary.html#locale" class="olink">locale</a>
glossary
entries.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="PriceDivide_notes"></a><h2>NOTES</h2><p>This directive is overridden by eventual <code class="option">Locale</code> definition which,
by design of <code class="option">Locale</code>, allows it to be set differently for different
currencies.
</p></div><div class="refsect1"><a id="PriceDivide_availability"></a><h2>AVAILABILITY</h2><p>PriceDivide is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PriceDivide_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_641_12352"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 641</strong></p><div class="figure-contents"><pre class="screen">
['PriceDivide', undef, 1],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PriceDivide_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PriceDivide_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#currency" class="olink"><span class="citerefentry"><span class="refentrytitle">currency</span>(7ic)</span></a>, <a class="link" href="#Locale" title="Locale"><span class="citerefentry"><span class="refentrytitle">Locale</span>(7ic)</span></a>, <a class="link" href="#PriceField" title="PriceField"><span class="citerefentry"><span class="refentrytitle">PriceField</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="PriceField"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>PriceField — specify name of the "price" field in the Interchange database
</p></div><div class="refsect1"><a id="PriceField_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>field_name</code></em> </p></div></div><div class="refsect1"><a id="PriceField_description"></a><h2>DESCRIPTION</h2><p>By default, <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> expects item price to be in the
<span class="database">price</span> field in the database.
This directive allows modification of the default name.
</p><p>
The field is accessed implicitly when you call say,
<code class="code">[item-price]</code> in <a href="glossary.html#ITL" class="olink">ITL</a>.
</p></div><div class="refsect1"><a id="PriceField_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="PriceField_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Redefining_PriceField_4568"></a><p class="title"><strong>Example: Redefining PriceField</strong></p><div class="example-contents"><pre class="programlisting">
PriceField preis
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_PriceField_depending_on_current_locale_4569"></a><p class="title"><strong>Example: Setting PriceField depending on current locale</strong></p><div class="example-contents"><pre class="programlisting">
# Establish the default at startup
PriceField price
# Establish locale-specific price field
Locale fr_FR PriceField prix
</pre><p>
With the above example, if is enabled, the
<span class="database">prix</span> field from the
<span class="database">pricing</span> database will be used to develop quantity-based
pricing.
</p><p>
To fully understand the example and implicitly presented <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> features, make
sure you're familiar with <a href="glossary.html#internationalization" class="olink">internationalization</a> and <a href="glossary.html#locale" class="olink">locale</a>
glossary
entries.
</p></div></div><br class="example-break" /></div><div class="refsect1"><a id="PriceField_notes"></a><h2>NOTES</h2><p>It is useful to set the directive based on current <a href="glossary.html#locale" class="olink">locale</a>.
</p></div><div class="refsect1"><a id="PriceField_availability"></a><h2>AVAILABILITY</h2><p>PriceField is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="PriceField_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_699_12508"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 699</strong></p><div class="figure-contents"><pre class="screen">
['PriceField', undef, 'price'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="PriceField_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="PriceField_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#PriceCommas" title="PriceCommas"><span class="citerefentry"><span class="refentrytitle">PriceCommas</span>(7ic)</span></a>, <a class="link" href="#PriceDivide" title="PriceDivide"><span class="citerefentry"><span class="refentrytitle">PriceDivide</span>(7ic)</span></a>, <a href="tags.html#price" class="olink"><span class="citerefentry"><span class="refentrytitle">price</span>(7ic)</span></a>, <a class="link" href="#PriceDefault" title="PriceDefault"><span class="citerefentry"><span class="refentrytitle">PriceDefault</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ProcessPage"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ProcessPage — specify "virtual" location of the form processor page
</p></div><div class="refsect1"><a id="ProcessPage_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>page_name</code></em> </p></div></div><div class="refsect1"><a id="ProcessPage_description"></a><h2>DESCRIPTION</h2><p>The directive specifies the name of the <code class="literal">process</code> page
(the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> <a href="glossary.html#form-processor" class="olink">form processor</a> page). The process page does not really
exist on the disk — it is defined as an <code class="option">ActionMap</code>.
</p></div><div class="refsect1"><a id="ProcessPage_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ProcessPage_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ProcessPage_4254"></a><p class="title"><strong>Example: Setting ProcessPage</strong></p><div class="example-contents"><pre class="programlisting">
ProcessPage proc
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ProcessPage_notes"></a><h2>NOTES</h2><p>The default of <code class="literal">process</code> satisfies most needs and
should rarely be changed.
</p></div><div class="refsect1"><a id="ProcessPage_availability"></a><h2>AVAILABILITY</h2><p>ProcessPage is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ProcessPage_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_575_12436"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 575</strong></p><div class="figure-contents"><pre class="screen">
['ProcessPage', undef, 'process'],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ProcessPage_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ProcessPage_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ProductDir"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ProductDir — specify directory containing database files
</p></div><div class="refsect1"><a id="ProductDir_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory</code></em> </p></div></div><div class="refsect1"><a id="ProductDir_description"></a><h2>DESCRIPTION</h2><p>Specify the directory containing database files.
The directory cannot be absolute, unless <code class="option">NoAbsolute</code> is disabled.
</p></div><div class="refsect1"><a id="ProductDir_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ProductDir_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ProductDir_3757"></a><p class="title"><strong>Example: Setting ProductDir</strong></p><div class="example-contents"><pre class="programlisting">
ProductDir databases
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Setting_ProductDir_to_an_absolute_value_3758"></a><p class="title"><strong>Example: Setting ProductDir to an absolute value</strong></p><div class="example-contents"><pre class="programlisting">
NoAbsolute 0
ProductDir /data/catalog/for-sale
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ProductDir_notes"></a><h2>NOTES</h2><p>The specified location is, unless absolute, treated relative to <a href="glossary.html#CATROOT" class="olink">CATROOT</a>.
</p><p>
This directive is also available through an alias
<code class="literal">DataDir</code>.
</p></div><div class="refsect1"><a id="ProductDir_availability"></a><h2>AVAILABILITY</h2><p>ProductDir is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ProductDir_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_541_12319"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 541</strong></p><div class="figure-contents"><pre class="screen">
['ProductDir', 'relative_dir', 'products'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3948__context_shows_lines_3948_3962__12320"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3948 (context shows lines 3948-3962)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_relative_dir {
my($var, $value) = @_;
if (absolute_or_relative($value)) {
config_error('Path %s not allowed in %s directive',
$value, $var);
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ProductDir_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ProductDir_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RunDir" title="RunDir"><span class="citerefentry"><span class="refentrytitle">RunDir</span>(7ic)</span></a>, <a class="link" href="#ScratchDir" title="ScratchDir"><span class="citerefentry"><span class="refentrytitle">ScratchDir</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ProductFiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ProductFiles — specify all databases containing products that form one big "products" database
</p></div><div class="refsect1"><a id="ProductFiles_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>database_name</code></em>... </p></div></div><div class="refsect1"><a id="ProductFiles_description"></a><h2>DESCRIPTION</h2><p>Specify <a href="glossary.html#database" class="olink">database</a> tables that should be, all together, logically seen
as one bigger <span class="database">products</span> database.
</p><p>
For example, when doing product searches, all <code class="option">ProductFiles</code> databases
will be searched.
</p></div><div class="refsect1"><a id="ProductFiles_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ProductFiles_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_ProductFiles_4061"></a><p class="title"><strong>Example: Setting ProductFiles</strong></p><div class="example-contents"><pre class="programlisting">
ProductFiles vendor_a vendor_b
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ProductFiles_notes"></a><h2>NOTES</h2><p>This directive is also available through an alias
<code class="literal">DefaultTables</code>.
</p></div><div class="refsect1"><a id="ProductFiles_availability"></a><h2>AVAILABILITY</h2><p>ProductFiles is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ProductFiles_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_557_12386"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 557</strong></p><div class="figure-contents"><pre class="screen">
['ProductFiles', 'array_complete', 'products'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3813__context_shows_lines_3813_3826__12387"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3813 (context shows lines 3813-3826)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_array_complete {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;
my $c = [];
for (@setting) {
check_legal($item, $_);
push @{$c}, $_;
}
$c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ProductFiles_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ProductFiles_seeAlso"></a><h2>SEE ALSO</h2><p></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Profile"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Profile</p></div><div class="refsect1"><a id="Profile_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="Profile_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="Profile_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Profile_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="Profile_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Profile_availability"></a><h2>AVAILABILITY</h2><p>Profile is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Profile_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_555_12414"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 555</strong></p><div class="figure-contents"><pre class="screen">
['Profile', 'locale', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3060__context_shows_lines_3060_3124__12415"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3060 (context shows lines 3060-3124)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_locale {
my($item,$settings) = @_;
return ($settings || '') unless $settings =~ /[^\d.]/;
$settings = '' if "\L$settings" eq 'default';
my $name;
my ($c, $store);
if(defined $C) {
$c = $C->{$item} || { };
$C->{$item . "_repository"} = {}
unless $C->{$item . "_repository"};
$store = $C->{$item . "_repository"};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
${"Global::$item" . "_repository"} = {}
unless ${"Global::$item" . "_repository"};
$store = ${"Global::$item" . "_repository"};
}
my ($eval, $safe);
if ($settings =~ s/^\s*([-\w.@]+)(?:\s+)?//) {
$name = $1;
undef $eval;
$settings =~ /^\s*{/
and $settings =~ /}\s*$/
and $eval = 1;
$eval and ! $safe and $safe = new Vend::Safe;
if(! defined $store->{$name} and $item eq 'Locale') {
my $past = POSIX::setlocale(POSIX::LC_ALL);
if(POSIX::setlocale(POSIX::LC_ALL, $name) ) {
$store->{$name} = POSIX::localeconv();
}
POSIX::setlocale(POSIX::LC_ALL, $past);
}
my($sethash);
if ($eval) {
$sethash = $safe->reval($settings)
or config_warn("bad Locale setting in %s: %s", $name, $@),
$sethash = {};
}
else {
$settings =~ s/^\s+//;
$settings =~ s/\s+$//;
$sethash = {};
%{$sethash} = Text::ParseWords::shellwords($settings);
}
$c = $store->{$name} || {};
my $nodefaults = delete $sethash->{MV_LOCALE_NO_DEFAULTS};
for (keys %{$sethash}) {
$c->{$_} = $sethash->{$_};
}
}
else {
config_error("Bad locale setting $settings.\n");
}
$C->{LastLocale} = $name if $C and $item eq 'Locale';
$store->{$name} = $c unless $store->{$name};
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Profile_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Profile_seeAlso"></a><h2>SEE ALSO</h2><p><a href="tags.html#profile" class="olink"><span class="citerefentry"><span class="refentrytitle">profile</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Profiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Profiles — specify files containing OrderProfile definitions on a global level
</p></div><div class="refsect1"><a id="Profiles_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>filename</code></em>... </p></div></div><div class="refsect1"><a id="Profiles_description"></a><h2>DESCRIPTION</h2><p>Specify filenames that contain <code class="option">OrderProfile</code>
definitions on a global level.
</p></div><div class="refsect1"><a id="Profiles_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="Profiles_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_Profiles_3140"></a><p class="title"><strong>Example: Defining Profiles</strong></p><div class="example-contents"><pre class="programlisting">
Profiles etc/profiles.common
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Profiles_notes"></a><h2>NOTES</h2><p>For the complete discussion, please see the <a href="glossary.html#profile" class="olink">profile</a> glossary entry.
</p></div><div class="refsect1"><a id="Profiles_availability"></a><h2>AVAILABILITY</h2><p>Profiles is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Profiles_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_511_12144"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 511</strong></p><div class="figure-contents"><pre class="screen">
['Profiles', 'profile', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_4789__context_shows_lines_4789_4830__12145"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 4789 (context shows lines 4789-4830)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_profile {
my ($var, $value) = @_;
my ($c, $ref, $sref, $i);
if($C) {
$C->{"${var}Name"} = {} if ! $C->{"${var}Name"};
$sref = $C->{Source};
$ref = $C->{"${var}Name"};
$c = $C->{$var} || [];
}
else {
no strict 'refs';
$sref = $Global::Source;
${"Global::${var}Name"} = {}
if ! ${"Global::${var}Name"};
$ref = ${"Global::${var}Name"};
$c = ${"Global::$var"} || [];
}
$sref->{$var} = $value;
my (@files) = glob($value);
for(@files) {
next unless $_;
config_error(
"No leading / allowed if NoAbsolute set. Contact administrator.\n")
if m.^/. and $Global::NoAbsolute;
config_error(
"No leading ../.. allowed if NoAbsolute set. Contact administrator.\n")
if m#^\.\./.*\.\.# and $Global::NoAbsolute;
push @$c, (split /\s*[\r\n]+__END__[\r\n]+\s*/, readfile($_));
}
for($i = 0; $i < @$c; $i++) {
if($c->[$i] =~ s/(^|\n)__NAME__\s+([^\n\r]+)\r?\n/$1/) {
my $name = $2;
$name =~ s/\s+$//;
$ref->{$name} = $i;
}
}
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Profiles_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Profiles_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#SearchProfile" title="SearchProfile"><span class="citerefentry"><span class="refentrytitle">SearchProfile</span>(7ic)</span></a>, <a class="link" href="#OrderProfile" title="OrderProfile"><span class="citerefentry"><span class="refentrytitle">OrderProfile</span>(7ic)</span></a>, <a class="link" href="#OrderReport" title="OrderReport"><span class="citerefentry"><span class="refentrytitle">OrderReport</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Promiscuous"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Promiscuous — allow output of HTML code in value variables
</p></div><div class="refsect1"><a id="Promiscuous_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> No | Yes </p></div></div><div class="refsect1"><a id="Promiscuous_description"></a><h2>DESCRIPTION</h2><p>Allow output of <a href="glossary.html#HTML" class="olink">HTML</a> code from <code class="sgmltag-element">value</code> tags.
</p></div><div class="refsect1"><a id="Promiscuous_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Promiscuous_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_Promiscuous_3585"></a><p class="title"><strong>Example: Defining Promiscuous</strong></p><div class="example-contents"><pre class="programlisting">
Promiscuous yes
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Promiscuous_notes"></a><h2>NOTES</h2><p>By default, when this directive is disabled, the characteristic HTML characters
(< and >), are encoded to &lt; and &gt;.
</p><p>
This catalog-wide directive is equivalent in effect to passing
<code class="code">enable_html=1</code> attribute to the individual <code class="sgmltag-element">value</code> tags.
</p></div><div class="refsect1"><a id="Promiscuous_availability"></a><h2>AVAILABILITY</h2><p>Promiscuous is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Promiscuous_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_652_12275"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 652</strong></p><div class="figure-contents"><pre class="screen">
['Promiscuous', 'yesno', 'No'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5398__context_shows_lines_5398_5410__12276"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5398 (context shows lines 5398-5410)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
return 0;
}
else {
config_error("Use 'yes' or 'no' for the $var directive\n");
}
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Promiscuous_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Promiscuous_seeAlso"></a><h2>SEE ALSO</h2><p><a href="widgets.html#value" class="olink"><span class="citerefentry"><span class="refentrytitle">value</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="ReadPermission"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ReadPermission — affect file mode (read permissions, specifically) on Interchange-generated files
</p></div><div class="refsect1"><a id="ReadPermission_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <code class="literal">user</code> | <code class="literal">group</code> | <code class="literal">world</code> </p></div></div><div class="refsect1"><a id="ReadPermission_description"></a><h2>DESCRIPTION</h2><p>By default, only the user account that <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> runs under,
can read and read files created by <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>. The specified option allows
adjustment of file read permissions.
</p></div><div class="refsect1"><a id="ReadPermission_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="ReadPermission_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Producing_desired_read_and_write_file_modes_3889"></a><p class="title"><strong>Example: Producing desired read and write file modes</strong></p><div class="example-contents"><pre class="programlisting">
ReadPermission group
WritePermission group
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="ReadPermission_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="ReadPermission_availability"></a><h2>AVAILABILITY</h2><p>ReadPermission is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="ReadPermission_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_597_12350"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 597</strong></p><div class="figure-contents"><pre class="screen">
['ReadPermission', 'permission', 'user'],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_5412__context_shows_lines_5412_5421__12351"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 5412 (context shows lines 5412-5421)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_permission {
my($var, $value) = @_;
$_ = $value;
tr/A-Z/a-z/;
if ($_ ne 'user' and $_ ne 'group' and $_ ne 'world') {
config_error("Permission must be one of 'user', 'group', or 'world' for the $var directive\n");
}
$_;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="ReadPermission_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="ReadPermission_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#WritePermission" title="WritePermission"><span class="citerefentry"><span class="refentrytitle">WritePermission</span>(7ic)</span></a>, <a class="link" href="#SetGroup" title="SetGroup"><span class="citerefentry"><span class="refentrytitle">SetGroup</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="RedirectCache"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>RedirectCache — use Interchange to generate static web server pages
</p></div><div class="refsect1"><a id="RedirectCache_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directory_name</code></em> </p></div></div><div class="refsect1"><a id="RedirectCache_description"></a><h2>DESCRIPTION</h2><p>This directive, along with <code class="option">AcceptRedirect</code>, allows
the web server to route requests for missing static HTML pages to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>.
Interchange processes the requests and saves the produced static content
to the directory pointed by <code class="option">RedirectCache</code>. On next web server
page access, the pages are found and served as static content by the
web server directly.
</p><p>
Requests routed to <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> in this way use a temporary session (<code class="mv">mv_tmp_session</code>).
In case the <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> page is not found, the usual <code class="option">SpecialPage</code> "missing"
is shown and no writing to the web server HTML directory takes place.
</p></div><div class="refsect1"><a id="RedirectCache_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="RedirectCache_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Enabling_RedirectCache_4274"></a><p class="title"><strong>Example: Enabling RedirectCache</strong></p><div class="example-contents"><pre class="programlisting">
AcceptRedirect Yes
RedirectCache /var/www/html
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="RedirectCache_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="RedirectCache_availability"></a><h2>AVAILABILITY</h2><p>RedirectCache is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="RedirectCache_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_688_12440"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 688</strong></p><div class="figure-contents"><pre class="screen">
['RedirectCache', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="RedirectCache_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="RedirectCache_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AcceptRedirect" title="AcceptRedirect"><span class="citerefentry"><span class="refentrytitle">AcceptRedirect</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="RemoteUser"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>RemoteUser — specify required value of the REMOTE_USER environment variable
</p></div><div class="refsect1"><a id="RemoteUser_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>username</code></em> </p></div></div><div class="refsect1"><a id="RemoteUser_description"></a><h2>DESCRIPTION</h2><p>Specify required value of the <code class="envar">REMOTE_USER</code> HTTP environment
variable that will enable catalog reconfiguration. HTTP basic authentication
must be configured at web server side for this to work.
</p></div><div class="refsect1"><a id="RemoteUser_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="RemoteUser_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_RemoteUser_3992"></a><p class="title"><strong>Example: Setting RemoteUser</strong></p><div class="example-contents"><pre class="programlisting">
RemoteUser interchange
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="RemoteUser_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="RemoteUser_availability"></a><h2>AVAILABILITY</h2><p>RemoteUser is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="RemoteUser_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_661_12371"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 661</strong></p><div class="figure-contents"><pre class="screen">
['RemoteUser', undef, ''],
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="RemoteUser_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="RemoteUser_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Environment" title="Environment"><span class="citerefentry"><span class="refentrytitle">Environment</span>(7ic)</span></a>, <a href="tags.html#reconfig" class="olink"><span class="citerefentry"><span class="refentrytitle">reconfig</span>(7ic)</span></a>, <a class="link" href="#Password" title="Password"><span class="citerefentry"><span class="refentrytitle">Password</span>(7ic)</span></a>, <a class="link" href="#MasterHost" title="MasterHost"><span class="citerefentry"><span class="refentrytitle">MasterHost</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Replace"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Replace — reset directive to a new value, or to its default
</p></div><div class="refsect1"><a id="Replace_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>directive_name</code></em> [<em class="replaceable"><code>value</code></em>]</p></div></div><div class="refsect1"><a id="Replace_description"></a><h2>DESCRIPTION</h2><p>Cause <a href="glossary.html#configuration" class="olink">configuration</a> directive's value to be emptied and reset to the specified
value, or to its default.
</p><p>
This is useful primarily for resetting configuration directives which append
to existing data, so there's no other convenient way to reset them to
initial values.
</p></div><div class="refsect1"><a id="Replace_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Replace_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Replacing_NoCache_3622"></a><p class="title"><strong>Example: Replacing NoCache</strong></p><div class="example-contents"><pre class="programlisting">
Replace NoCache ord special multi reconfig query
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Replace_notes"></a><h2>NOTES</h2><p>Capitalization must be exact on each directive.
</p></div><div class="refsect1"><a id="Replace_availability"></a><h2>AVAILABILITY</h2><p>Replace is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Replace_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_593_12286"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 593</strong></p><div class="figure-contents"><pre class="screen">
['Replace', 'replace', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2933__context_shows_lines_2933_2941__12287"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2933 (context shows lines 2933-2941)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_replace {
my($name, $val) = @_;
return {} unless $val;
$C->{$val} = get_catalog_default($val);
$C->{$name}->{$val} = 1;
$C->{$name};
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Replace_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Replace_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#AddDirective" title="AddDirective"><span class="citerefentry"><span class="refentrytitle">AddDirective</span>(7ic)</span></a>, <a class="link" href="#DatabaseDefault" title="DatabaseDefault"><span class="citerefentry"><span class="refentrytitle">DatabaseDefault</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Require"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Require — require existence of a capability
</p></div><div class="refsect1"><a id="Require_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p>
<em class="replaceable"><code>type</code></em>
<em class="replaceable"><code>type-specific_value</code></em>
... </p></div></div><div class="refsect1"><a id="Require_description"></a><h2>DESCRIPTION</h2><p>Just like <code class="option">Capability</code> or <code class="option">Suggest</code>, this directive checks for
a feature or capability. When the tested feature is missing, a
catalog is not configured and not included in global configuration.
</p><p>
This is useful to ensure that needed facilities are present, especially if
you run the catalog on different locations.
</p><p>
"Capabilities" you can require are:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<code class="literal">globalsub</code> — existence of a <code class="option">GlobalSub</code>
</p></li><li class="listitem"><p>
<code class="literal">sub</code> — existence of a <code class="option">Sub</code>
</p></li><li class="listitem"><p>
<code class="literal">taggroup</code> — existence of a <code class="option">TagGroup</code>
</p></li><li class="listitem"><p>
<code class="literal">usertag</code> — existence of a <code class="option">UserTag</code>
</p></li><li class="listitem"><p>
<code class="literal">module (or perlmodule)</code> — existence of a <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a> module. Optional additional argument is the custom Perl module path.
</p></li><li class="listitem"><p>
<code class="literal">include (or perlinclude)</code> — prepend specified path to <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a>'s <code class="varname">@INC</code> include path (makes most sense with <code class="option">Require</code>, not with <code class="option">Suggest</code> or <code class="option">Capability</code> even though it <span class="emphasis"><em>can</em></span> be called that way for equivalent effect)
</p></li><li class="listitem"><p>
<code class="literal">file</code> — existence of a readable file
</p></li><li class="listitem"><p>
<code class="literal">executable</code> — existence of an executable file
</p></li></ul></div><p>
</p></div><div class="refsect1"><a id="Require_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive,<br />
Catalog directive</p></div><div class="refsect1"><a id="Require_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Requiring_existence_of_all_supported_items_3019"></a><p class="title"><strong>Example: Requiring existence of all supported items</strong></p><div class="example-contents"><pre class="programlisting">
Require globalsub my_global_sub
Require sub my_sub
Require taggroup :group1,:group2 :group3
Require usertag my_global_usertag
Require usertag my_catalog_usertag
Require module Archive::Zip
Require module Set::Crontab /usr/local/perl/modules/
Require file /etc/syslog.conf
Require file relative-dir/file
Require executable /usr/local/bin/gfont
Require executable bin/gfont
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Requiring_existence_of_old_style_Perl_modules_3020"></a><p class="title"><strong>Example: Requiring existence of old-style Perl modules</strong></p><div class="example-contents"><pre class="programlisting">
Require module /path/to/module.pl
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Requiring_features_3021"></a><p class="title"><strong>Example: Requiring features</strong></p><div class="example-contents"><pre class="programlisting">
Require module Archive::Zip
Require usertag table_editor
Require globalsub file_info
</pre></div></div><br class="example-break" /><div class="example"><a id="example_Loading_module_with_expanded_search_path_3022"></a><p class="title"><strong>Example: Loading module with expanded search path</strong></p><div class="example-contents"><pre class="programlisting">
Require module Vend::Swish /usr/lib/swish-e/perl
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="Require_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Require_availability"></a><h2>AVAILABILITY</h2><p>Require is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Require_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_400_12111"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 400</strong></p><div class="figure-contents"><pre class="screen">
['Require', 'require', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_548_12112"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 548</strong></p><div class="figure-contents"><pre class="screen">
['Require', 'require', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_2681__context_shows_lines_2681_2852__12113"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 2681 (context shows lines 2681-2852)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_require {
my($var, $val, $warn, $cap) = @_;
return if $Vend::ExternalProgram;
return if $Vend::ControllingInterchange;
my $carptype;
my $error_message;
my $pathinfo;
if($val =~ s/\s+"(.*)"//s) {
$error_message = "\a\n\n$1\n";
}
if($val =~ s%\s+((/[\w.-]+)+)%%) {
$pathinfo = $1;
}
if($cap) {
$carptype = sub { return; };
}
elsif($warn) {
$carptype = sub { return parse_message('', @_) };
$error_message = "\a\n\nSuggest %s %s for proper catalog operation. \
Not all functions will work!\n"
unless $error_message;
}
else {
$carptype = \&config_error;
$error_message ||= 'Required %s %s not present. Aborting '
. ($C ? 'catalog' : 'Interchange daemon') . '.';
}
my $nostrict;
my $perlglobal = 1;
if($C) {
$nostrict = $Global::PerlNoStrict->{$C->{CatalogName}};
$perlglobal = $Global::AllowGlobal->{$C->{CatalogName}};
}
my $vref = $C ? $C->{Variable} : $Global::Variable;
my $require;
my $testsub = sub { 0 };
my $name;
if($val =~ s/^globalsub\s+//i) {
$require = $Global::GlobalSub;
$name = 'GlobalSub';
}
elsif($val =~ s/^sub\s+//i) {
$require = $C->{Sub};
$name = 'Sub';
}
elsif($val =~ s/^taggroup\s+//i) {
$require = $Global::UserTag->{Routine};
my @groups = grep /\S/, split /[\s,]+/, $val;
my @needed;
my $ref;
for (@groups) {
if($ref = $Global::TagGroup->{$_}) {
push @needed, @$ref;
}
else {
push @needed, $_;
}
}
$name = "TagGroup $val member";
$val = join " ", @needed;
}
elsif($val =~ s/^usertag\s+//i) {
$require = {};
$name = 'UserTag';
$testsub = sub {
my $name = shift;
my @tries = ($Global::UserTag->{Routine});
push(@tries,$C->{UserTag}->{Routine}) if $C;
foreach (@tries) {
return 1 if defined $_->{$name};
}
return 0;
};
}
elsif($val =~ s/^(?:perl)?module\s+//i) {
$require = {};
$name = 'Perl module';
$testsub = sub {
my $module = shift;
my $oldtype = '';
if($module =~ s/\.pl$//) {
$oldtype = '.pl';
}
$module =~ /[^\w:]/ and return undef;
if($perlglobal) {
if ($pathinfo) {
unshift(@INC, $pathinfo);
}
eval "require $module$oldtype;";
my $error = $@;
if ($pathinfo) {
shift(@INC);
}
::logGlobal("while eval'ing module %s got [%s]\n", $module, $error) if $error;
return ! $error;
}
else {
# Since we aren't safe to actually require, we will
# just look for a readable module file
$module =~ s!::!/!g;
$oldtype = '.pm' if ! $oldtype;
my $found;
for(@INC) {
next unless -f "$_/$module$oldtype" and -r _;
$found = 1;
}
return $found;
}
};
}
elsif ($val =~ s/^(?:perl)?include\s+//i) {
my $path = Vend::File::make_absolute_file($val, 1);
$require = {};
$name = 'Perl include path';
$testsub =
sub {
if (-d $path) {
unshift @INC, $path;
return 1;
}
return 0;
};
}
elsif ($val =~ s/^file\s*//i) {
$require = {};
$name = 'Readable file';
$val = $pathinfo unless $val;
$testsub = sub {
my $path = Vend::File::make_absolute_file(shift, $C ? 0 : 1);
if ($C && $path =~ s:^/+::) {
$path = "$C->{VendRoot}/$path";
}
return -r $path;
};
}
elsif ($val =~ s/^executable\s*//i) {
$require = {};
$name = 'Executable file';
$val = $pathinfo unless $val;
$testsub = sub {
my $path = Vend::File::make_absolute_file(shift, $C ? 0 : 1);
if ($C && $path =~ s:^/+::) {
$path = "$C->{VendRoot}/$path";
}
return -x $path;
};
}
my @requires = grep /\S/, split /\s+/, $val;
my $uname = uc $name;
$uname =~ s/.*\s+//;
for(@requires) {
$vref->{"MV_REQUIRE_${uname}_$_"} = 1;
next if defined $require->{$_};
next if $testsub->($_);
delete $vref->{"MV_REQUIRE_${uname}_$_"};
$carptype->( $error_message, $name, $_ );
}
return '';
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="Require_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="Require_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#Capability" title="Capability"><span class="citerefentry"><span class="refentrytitle">Capability</span>(7ic)</span></a>, <a class="link" href="#Suggest" title="Suggest"><span class="citerefentry"><span class="refentrytitle">Suggest</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="RobotHost"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>RobotHost — specify hostnames that will be classified as crawler bots (search engines) visiting the site
</p></div><div class="refsect1"><a id="RobotHost_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>hostname_glob</code></em>... </p></div></div><div class="refsect1"><a id="RobotHost_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">RobotHost</code> directive defines a list of hostnames which will be
classified as crawler robots (search engines), and cause <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to alter its
behavior to improve the chance of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>-served content being crawled
and indexed.
</p><p>
Note that this directive (and all other work done to identify robots)
only serves to improve the way in which <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> pages are indexed, and to
reduce server overhead for clients that don't require our full attention
in the way humans do (for example, session information is not kept around
for spider bots).
Using this to "tune" the actual page content depending on a crawler
visiting does not earn you extra points, and may in fact be
detected by the robot and punished.
</p><p>
It's important to note that the directive accepts a wildcard list similar
to globbing —
<code class="literal">*</code> represents any number of characters, while
<code class="literal">?</code> represents a single character.
</p></div><div class="refsect1"><a id="RobotHost_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="RobotHost_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_RobotHost_3278"></a><p class="title"><strong>Example: Defining RobotHost</strong></p><div class="example-contents"><pre class="programlisting">
RobotHost <<EOR
*.crawler*.com, *.excite.com, *.googlebot.com,
*.infoseek.com, *.inktomi.com, *.inktomisearch.com,
*.lycos.com, *.pa-x.dec.com, add-url.altavista.com,
westinghouse-rsl-com-usa.NorthRoyalton.cw.net,
EOR
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="RobotHost_notes"></a><h2>NOTES</h2><p>For more details regarding web spiders/bots and <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>, see
<a href="glossary.html#robot" class="olink">robot</a> glossary entry.
</p></div><div class="refsect1"><a id="RobotHost_availability"></a><h2>AVAILABILITY</h2><p>RobotHost is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="RobotHost_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_487_12183"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 487</strong></p><div class="figure-contents"><pre class="screen">
['RobotHost', 'list_wildcard_full', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3834__context_shows_lines_3834_3838__12184"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3834 (context shows lines 3834-3838)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_list_wildcard_full {
my $value = get_wildcard_list(@_,1);
return '' unless length($value);
return qr/^($value)$/i;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="RobotHost_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="RobotHost_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RobotIP" title="RobotIP"><span class="citerefentry"><span class="refentrytitle">RobotIP</span>(7ic)</span></a>, <a class="link" href="#RobotUA" title="RobotUA"><span class="citerefentry"><span class="refentrytitle">RobotUA</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="RobotIP"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>RobotIP — specify IP numbers or ranges that will be classified as crawler bots (search engines)
</p></div><div class="refsect1"><a id="RobotIP_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>IP_address_glob</code></em>... </p></div></div><div class="refsect1"><a id="RobotIP_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">RobotIP</code> directive defines a list of IP numbers which will be
classified as crawler robots (search engines), and cause <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to alter its
behavior to improve the chance of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>-served content being crawled
and indexed.
</p><p>
Note that this directive (and all other work done to identify robots)
only serves to improve the way in which <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> pages are indexed, and to
reduce server overhead for clients that don't require our full attention
in the way humans do (for example, session information is not kept around
for spider bots).
Using this to "tune" the actual page content depending on a crawler
visiting does not earn you extra points, and may in fact be
detected by the robot and punished.
</p><p>
It's important to note that the directive accepts a wildcard list similar
to globbing —
<code class="literal">*</code> represents any number of characters, while
<code class="literal">?</code> represents a single character.
</p></div><div class="refsect1"><a id="RobotIP_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="RobotIP_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_RobotIP_2632"></a><p class="title"><strong>Example: Defining RobotIP</strong></p><div class="example-contents"><pre class="programlisting">
RobotIP <<EOR
202.9.155.123, 204.152.191.41, 208.146.26.19,
208.146.26.233, 209.185.141.209, 209.185.141.211,
209.202.148.36, 209.202.148.41, 216.200.130.207,
216.35.103.6?, 216.35.103.*,
EOR
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="RobotIP_notes"></a><h2>NOTES</h2><p>For more details regarding web spiders/bots and <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>, see
<a href="glossary.html#robot" class="olink">robot</a> glossary entry.
</p></div><div class="refsect1"><a id="RobotIP_availability"></a><h2>AVAILABILITY</h2><p>RobotIP is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="RobotIP_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_486_12011"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 486</strong></p><div class="figure-contents"><pre class="screen">
['RobotIP', 'list_wildcard_full', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3834__context_shows_lines_3834_3838__12012"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3834 (context shows lines 3834-3838)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_list_wildcard_full {
my $value = get_wildcard_list(@_,1);
return '' unless length($value);
return qr/^($value)$/i;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="RobotIP_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="RobotIP_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RobotHost" title="RobotHost"><span class="citerefentry"><span class="refentrytitle">RobotHost</span>(7ic)</span></a>, <a class="link" href="#RobotUA" title="RobotUA"><span class="citerefentry"><span class="refentrytitle">RobotUA</span>(7ic)</span></a>, <a class="link" href="#NotRobotUA" title="NotRobotUA"><span class="citerefentry"><span class="refentrytitle">NotRobotUA</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="RobotLimit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>RobotLimit — specify maximum number of pages a user can visit without a short pause
</p></div><div class="refsect1"><a id="RobotLimit_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>count</code></em> </p></div></div><div class="refsect1"><a id="RobotLimit_description"></a><h2>DESCRIPTION</h2><p>Specify maximum number of
consecutive pages a user may access without a short pause.
</p><p>
When the <code class="option">RobotLimit</code> is
exceeded, the command defined in <code class="option">LockoutCommand</code> will be executed and
the catalog URLs will be rewritten to
<code class="literal">127.0.0.1</code>, effectively pointing the robot back to itself.
</p><p>
The short pause amounts to 30 seconds and can be configured using the <code class="option">Limit</code>
directive's <code class="literal">lockout_reset_seconds</code> setting.
</p><p>
If a remote client gets assigned a new session with every visit, rather than
maintaining a single session, then this directive sets the limit for the
number of sessions that may be assigned to the individual IP address over a
one hour period. The one hour period can be overridden using the <code class="option">Limit</code>
directive's <code class="literal">ip_session_expire</code> setting. If a lockout is triggered it will
remain in effect for 1 day. The one day period can be overridden with the
<code class="option">Limit</code> directive's <code class="literal">robot_expire</code> setting.
</p></div><div class="refsect1"><a id="RobotLimit_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="RobotLimit_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Setting_RobotLimit_4289"></a><p class="title"><strong>Example: Setting RobotLimit</strong></p><div class="example-contents"><pre class="programlisting">
RobotLimit 200
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="RobotLimit_notes"></a><h2>NOTES</h2><p>Set the directive to a number greater than the number of pages users are
ever expected to visit in a short time frame.
</p></div><div class="refsect1"><a id="RobotLimit_availability"></a><h2>AVAILABILITY</h2><p>RobotLimit is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="RobotLimit_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_686_12443"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 686</strong></p><div class="figure-contents"><pre class="screen">
['RobotLimit', 'integer', 0],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3965__context_shows_lines_3965_3972__12444"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3965 (context shows lines 3965-3972)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_integer {
my($var, $value) = @_;
$value = hex($value) if $value =~ /^0x[\dA-Fa-f]+$/;
$value = oct($value) if $value =~ /^0[0-7]+$/;
config_error("The $var directive (now set to '$value') must be an integer\n")
unless $value =~ /^\d+$/;
$value;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="RobotLimit_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="RobotLimit_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#OrderLineLimit" title="OrderLineLimit"><span class="citerefentry"><span class="refentrytitle">OrderLineLimit</span>(7ic)</span></a>, <a class="link" href="#LockoutCommand" title="LockoutCommand"><span class="citerefentry"><span class="refentrytitle">LockoutCommand</span>(7ic)</span></a>, <a class="link" href="#Limit" title="Limit"><span class="citerefentry"><span class="refentrytitle">Limit</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="RobotUA"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>RobotUA — specify user-agents that will be classified as crawler bots (search engines)
</p></div><div class="refsect1"><a id="RobotUA_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p> <em class="replaceable"><code>useragent_string</code></em>... </p></div></div><div class="refsect1"><a id="RobotUA_description"></a><h2>DESCRIPTION</h2><p>The <code class="option">RobotUA</code> directive defines a list of useragent strings which will be
classified as crawler robots (search engines), and cause <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> to alter its
behavior to improve the chance of <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>-served content being crawled
and indexed.
</p><p>
Note that this directive (and all other work done to identify robots)
only serves to improve the way in which <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a> pages are indexed, and to
reduce server overhead for clients that don't require our full attention
in the way humans do (for example, session information is not kept around
for spider bots).
Using this to "tune" the actual page content depending on a crawler
visiting does not earn you extra points, and may in fact be
detected by the robot and punished.
</p><p>
It's important to note that the directive accepts a wildcard list similar
to globbing —
<code class="literal">*</code> represents any number of characters, while
<code class="literal">?</code> represents a single character.
</p></div><div class="refsect1"><a id="RobotUA_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Global directive</p></div><div class="refsect1"><a id="RobotUA_examples"></a><h2>EXAMPLES</h2><div class="example"><a id="example_Defining_RobotUA_2987"></a><p class="title"><strong>Example: Defining RobotUA</strong></p><div class="example-contents"><pre class="programlisting">
RobotUA <<EOR
ATN_Worldwide, AltaVista, Arachnoidea, Aranha, Architext, Ask, Atomz,
BackRub, Builder, CMC, Contact, Digital*Integrity, Directory, EZResult,
Excite, Ferret, Fireball, Google, Gromit, Gulliver, Harvest, Hubater,
H?m?h?kki, INGRID, IncyWincy, Jack, KIT*Fireball, Kototoi, LWP, Lycos,
MegaSheep, Mercator, Nazilla, NetMechanic, NetResearchServer, NetScoop,
ParaSite, Refiner, RoboDude, Rover, Rutgers, Scooter, Slurp, Spyder,
T-H-U-N-D-E-R-S-T-O-N-E, Toutatis, Tv*Merc, Valkyrie, Voyager, WIRE,
Walker, Wget, WhizBang, Wire, Wombat, Yahoo, Yandex, ZyBorg, appie,
asterias, bot, contact, crawl, collector, fido, find, gazz, grabber,
griffon, archiver, legs, marvin, mirago, moget, newscan, seek, speedy,
spider, suke, tarantula, agent, topiclink, whowhere, winona, worm, xtreme,
EOR
</pre></div></div><br class="example-break" /></div><div class="refsect1"><a id="RobotUA_notes"></a><h2>NOTES</h2><p>For more details regarding web spiders/bots and <a class="ulink" href="http://www.icdevgroup.org/" target="_top">Interchange</a>, see
<a href="glossary.html#robot" class="olink">robot</a> glossary entry.
</p></div><div class="refsect1"><a id="RobotUA_availability"></a><h2>AVAILABILITY</h2><p>RobotUA is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="RobotUA_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_485_12104"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 485</strong></p><div class="figure-contents"><pre class="screen">
['RobotUA', 'list_wildcard', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3828__context_shows_lines_3828_3832__12105"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3828 (context shows lines 3828-3832)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_list_wildcard {
my $value = get_wildcard_list(@_,0);
return '' unless length($value);
return qr/$value/i;
}
</pre></div></div><br class="figure-break" /></div><div class="refsect1"><a id="RobotUA_authors"></a><h2>AUTHORS</h2><p><a class="ulink" href="http://www.icdevgroup.org" target="_top">Interchange Development Group</a></p></div><div class="refsect1"><a id="RobotUA_seeAlso"></a><h2>SEE ALSO</h2><p><a class="link" href="#RobotIP" title="RobotIP"><span class="citerefentry"><span class="refentrytitle">RobotIP</span>(7ic)</span></a>, <a class="link" href="#NotRobotUA" title="NotRobotUA"><span class="citerefentry"><span class="refentrytitle">NotRobotUA</span>(7ic)</span></a>, <a class="link" href="#RobotHost" title="RobotHost"><span class="citerefentry"><span class="refentrytitle">RobotHost</span>(7ic)</span></a></p></div></div><div class="refentry"><div class="refentry.separator"><hr /></div><a id="Route"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Route — specify order and payment routes
</p></div><div class="refsect1"><a id="Route_synopsis"></a><h2>SYNOPSIS</h2><div class="cmdsynopsis"><p></p></div></div><div class="refsect1"><a id="Route_description"></a><h2>DESCRIPTION</h2><p></p></div><div class="refsect1"><a id="Route_type"></a><h2>DIRECTIVE TYPE AND DEFAULT VALUE</h2><p>Catalog directive</p></div><div class="refsect1"><a id="Route_examples"></a><h2>EXAMPLES</h2>
No examples are available at this time. We do consider this a problem and will try to supply some.
</div><div class="refsect1"><a id="Route_notes"></a><h2>NOTES</h2><p></p></div><div class="refsect1"><a id="Route_availability"></a><h2>AVAILABILITY</h2><p>Route is available in Interchange versions:
</p><p>
4.6.0-5.7.0 (git-head)</p></div><div class="refsect1"><a id="Route_source"></a><h2>SOURCE</h2><p>Interchange 5.7.0:
</p><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_607_12288"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 607</strong></p><div class="figure-contents"><pre class="screen">
['Route', 'locale', ''],
</pre></div></div><br class="figure-break" /><p>
</p><div class="figure"><a id="context_lib_Vend_Config_pm__sbr__Line_3060__context_shows_lines_3060_3124__12289"></a><p class="title"><strong>Source: <a class="ulink" href="http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/lib/Vend/Config.pm" target="_top">lib/Vend/Config.pm</a> <br />Line 3060 (context shows lines 3060-3124)</strong></p><div class="figure-contents"><pre class="screen">
sub parse_locale {
my($item,$settings) = @_;
return ($settings || '') unless $settings =~ /[^\d.]/;
$settings = '' if "\L$settings" eq 'default';
my $name;
my ($c, $store);
if(defined $C) {
$c = $C->{$item} || { };
$C->{$item . "_repository"} = {}
unless $C->{$item . "_repository"};
$store = $C->{$item . "_repository"};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
${"Global::$item" . "_repository"} = {}
unless ${"Global::$item" . "_repository"};
$store = ${"Global::$item" . "_repository"};
}
my ($eval, $safe);
if ($settings =~ s/^\s*([-\w.@]+)(?:\s+)?//) {
$name = $1;
undef $eval;
$settings =~ /^\s*{/
and $settings =~ /}\s*$/
and $eval = 1;
$eval and ! $safe and $safe = new Vend::Safe;
if(! defined $store->{$name} and $item eq 'Locale') {
my $past = POSIX::setlocale(POSIX::LC_ALL);
if(POSIX::setlocale(POSIX::LC_ALL, $name) ) {
$store->{$name} = POSIX::localeconv();
}
POSIX::setlocale(POSIX::LC_ALL, $past);
}
my($sethash);
if ($eval) {
$sethash = $safe->reval($settings)
or config_warn("bad Locale setting in %s: %s", $name, $@),
$sethash = {};
}
else {
$settings =~ s/^\s+//;
$settings =~ s/\s+$//;
$sethash = {};
%{$sethash} = Text::ParseWords::shellwords($settings);
}
$c = $store->{$name} || {};
my $nodefaults = delete $sethash->{MV_LOCALE_NO_DEFAULTS};
for (keys %{$sethash}) {
$c->{$_} = $sethash->{$_};
}
}
else {
config_error("Bad locale setting $settings.\n");
}
$C->{LastLocale} = $name if $C and $item eq 'Locale';
$store->{$name} = $c unless $store->{$name};
return $c;
}
</pre></div></div><br class="figure-break" /></div><div class="r