Changes between Version 1 and Version 2 of Doc/panc/advanced
- Timestamp:
- Mar 4, 2007, 5:55:04 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Doc/panc/advanced
v1 v2 6 6 The pan compiler uses a load path defined on the command line to autoload templates. The autoload 7 7 procedure stops with the first existing template and will load a template of a given name only once. 8 One can use the LOADPATH variable to add additional relative paths to the search path . Itmust9 be a list of relative paths as strings. This functionality can be used for example (in conjunction with8 One can use the LOADPATH variable to add additional relative paths to the search path during the evaluation of an object template. This variable must 9 be a list of relative paths given as strings. This functionality can be used for example (in conjunction with 10 10 namespaces) to switch between production and test versions of templates easily: 11 {{{ 11 12 object template test; 12 13 variable LOADPATH = ’production’; … … 14 15 include ’service_configuration’; 15 16 ... 17 }}} 16 18 With a path given on the command line like {{{/pan}}}, the pan compiler will search in {{{/pan}}} and then 17 19 {{{/pan/production}}} for the template named service configuration. Uncommenting the test 18 20 line and commenting the production line will search {{{/pan/test}}} rather than {{{/pan/production}}}. 21 19 22 All combinations of the paths given on the command line and those given in the LOADPATH variable 20 23 are searched until the needed template is found. The first path from the command line is searched first,