pragma

Pragmas are used to control various aspects of page and data parsing and display. They are processed before an Interchange page goes to the normal processing routine.

Pragma values can be defined at any level; catalog-wide, page-wide or ITL-block wide.

[Note]Note

Catalog-wide pragmas are equivalent to inserting [pragma ...] on every page. However, setting the Pragma catalog directive (instead of using the pragma tag all the time) has the benefit of initializing at catalog startup time (so, only once), which avoids extra hash key lookups. Namely, there is some crossover point at about 4 Perl references where it saves processor power to assign a scalar instead of looking it up every time.

To define a pragma catalog-wide, use the Pragma directive in catalog.cfg:

Pragma NAME [=value]

To define a pragma for a particular page, use the pragma tag anywhere on a page. For readability, however, we suggest to always define pragmas at the top. The following two lines, of which you would usually use only one at a time, present pragma activation and deactivation:

[pragma NAME]
[pragma NAME 0]

To define a pragma for an ITL block inside the page, enclose the block in [tag pragma ...]:

[tag pragma NAME]1[/tag]
  ...
[tag pragma NAME]0[/tag]

Starting with Interchange 5.0, the $::Pragma->{NAME} syntax is used in the Interchange source, instead of the old $Vend::Cfg->{Pragma}{NAME}.

See the list of available pragmas in Interchange Reference Pages: Pragmas.

DocBook! Interchange!