File: Params.html

package info (click to toggle)
libhtml-mason-perl 1%3A1.39-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,072 kB
  • ctags: 1,535
  • sloc: perl: 17,624; sh: 187; makefile: 12
file content (1190 lines) | stat: -rw-r--r-- 50,140 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTML::Mason::Params - Mason configuration parameters</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body style="background-color: white">

<p><A NAME="__index__"></a></p>
<!-- INDEX BEGIN -->

<ul>

	<li><A HREF="#name">NAME</a></li>
	<li><A HREF="#description">DESCRIPTION</a></li>
	<li><A HREF="#perl_and_apache_names">PERL AND APACHE NAMES</a></li>
	<ul>

		<li><A HREF="#where_apache_names_are_used">Where Apache Names Are Used</a></li>
		<li><A HREF="#where_perl_names_are_used">Where Perl Names Are Used</a></li>
	</ul>

	<li><A HREF="#parameters">PARAMETERS</a></li>
	<ul>

		<li><A HREF="#allow_globals">allow_globals</a></li>
		<li><A HREF="#apache_status_title">apache_status_title</a></li>
		<li><A HREF="#args_method">args_method</a></li>
		<li><A HREF="#auto_send_headers">auto_send_headers</a></li>
		<li><A HREF="#autoflush">autoflush</a></li>
		<li><A HREF="#autohandler_name">autohandler_name</a></li>
		<li><A HREF="#buffer_preallocate_size">buffer_preallocate_size</a></li>
		<li><A HREF="#code_cache_max_size">code_cache_max_size</a></li>
		<li><A HREF="#comp_class">comp_class</a></li>
		<li><A HREF="#comp_root">comp_root</a></li>
		<li><A HREF="#compiler_class">compiler_class</a></li>
		<li><A HREF="#component_error_handler">component_error_handler</a></li>
		<li><A HREF="#data_cache_api">data_cache_api</a></li>
		<li><A HREF="#data_cache_defaults">data_cache_defaults</a></li>
		<li><A HREF="#data_dir">data_dir</a></li>
		<li><A HREF="#decline_dirs">decline_dirs</a></li>
		<li><A HREF="#default_escape_flags">default_escape_flags</a></li>
		<li><A HREF="#define_args_hash">define_args_hash</a></li>
		<li><A HREF="#dhandler_name">dhandler_name</a></li>
		<li><A HREF="#dynamic_comp_root">dynamic_comp_root</a></li>
		<li><A HREF="#enable_autoflush">enable_autoflush</a></li>
		<li><A HREF="#error_format">error_format</a></li>
		<li><A HREF="#error_mode">error_mode</a></li>
		<li><A HREF="#escape_flags">escape_flags</a></li>
		<li><A HREF="#ignore_warnings_expr">ignore_warnings_expr</a></li>
		<li><A HREF="#in_package">in_package</a></li>
		<li><A HREF="#interp_class">interp_class</a></li>
		<li><A HREF="#lexer_class">lexer_class</a></li>
		<li><A HREF="#max_recurse">max_recurse</a></li>
		<li><A HREF="#named_component_subs">named_component_subs</a></li>
		<li><A HREF="#object_file_extension">object_file_extension</a></li>
		<li><A HREF="#out_method">out_method</a></li>
		<li><A HREF="#plugins">plugins</a></li>
		<li><A HREF="#postamble">postamble</a></li>
		<li><A HREF="#postprocess_perl">postprocess_perl</a></li>
		<li><A HREF="#postprocess_text">postprocess_text</a></li>
		<li><A HREF="#preamble">preamble</a></li>
		<li><A HREF="#preloads">preloads</a></li>
		<li><A HREF="#preprocess">preprocess</a></li>
		<li><A HREF="#request_class">request_class</a></li>
		<li><A HREF="#resolver_class">resolver_class</a></li>
		<li><A HREF="#static_source">static_source</a></li>
		<li><A HREF="#static_source_touch_file">static_source_touch_file</a></li>
		<li><A HREF="#subcomp_class">subcomp_class</a></li>
		<li><A HREF="#use_object_files">use_object_files</a></li>
		<li><A HREF="#use_source_line_numbers">use_source_line_numbers</a></li>
		<li><A HREF="#use_strict">use_strict</a></li>
	</ul>

</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<h1><A NAME="name">NAME</a></h1>
<p>HTML::Mason::Params - Mason configuration parameters</p>
<p>
</p>
<hr />
<h1><A NAME="description">DESCRIPTION</a></h1>
<p>This document lists all of the Mason configuration parameters that are
intended to be used by end users.</p>
<p>
</p>
<hr />
<h1><A NAME="perl_and_apache_names">PERL AND APACHE NAMES</a></h1>
<p>Each parameter has two names: a Perl version and an Apache version.
The Perl version uses <code>lowercase_with_underscores</code>, while the Apache
version uses <code>StudlyCaps</code> with a <code>Mason</code> prefix. The conversion from
one version to the other is otherwise very predictable. For example,</p>
<ul>
<li>
<p><code>autohandler_name</code> <code>&lt;--&gt;</code> <code>MasonAutohandlerName</code></p>
</li>
<li>
<p><code>comp_root</code> <code>&lt;--&gt;</code> <code>MasonCompRoot</code></p>
</li>
<li>
<p><code>data_cache_defaults</code> <code>&lt;--&gt;</code> <code>MasonDataCacheDefaults</code></p>
</li>
</ul>
<p>
</p>
<h2><A NAME="where_apache_names_are_used">Where Apache Names Are Used</a></h2>
<p>The Apache parameter names are used in the Apache configuration file
in an <A HREF="Admin.html#basic_configuration_via_httpd_co">httpd-based configuration</a>.</p>
<p>
</p>
<h2><A NAME="where_perl_names_are_used">Where Perl Names Are Used</a></h2>
<p>The Perl parameter names are used from Perl code, i.e. anywhere other
than the Apache configuration file. For example,</p>
<ul>
<li>
<p>In an <A HREF="Admin.html#advanced_configuration">custom wrapper-based configuraiton</a>, you can pass most of these parameters to the
<a HREF="ApacheHandler.html">ApacheHandler</a> constructor.</p>
</li>
<li>
<p>In a <A HREF="Admin.html#using_mason_from_a_standalone_sc">standalone Mason script</a>, you can pass most of these parameters to the
<a HREF="Interp.html">Interp</a> constructor.</p>
</li>
<li>
<p>When launching a <A HREF="Devel.html#subrequests">subrequest</a>, you can
pass any of the <code>HTML::Mason::Request</code> parameters to
<A HREF="Request.html#item_make_subrequest">make_subrequest</a>.</p>
</li>
</ul>
<p>
</p>
<hr />
<h1><A NAME="parameters">PARAMETERS</a></h1>
<p>
</p>
<h2><A NAME="allow_globals">allow_globals</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_allow_globals">Perl name:           allow_globals</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonallowgl">Apache name:         MasonAllowGlobals</a></strong>

<li><strong><A NAME="item_type_in_httpd_2econf_3a_lis">Type in httpd.conf:  list</a></strong>

<li><strong><A NAME="item_default_3a__5b_5d">Default:             []</a></strong>

<li><strong><A NAME="item_belongs_to_3a_html_3a_3amas">Belongs to:          <code>HTML::Mason::Compiler</code></a></strong>

</ul>
<p>List of variable names, complete with prefix (<code>$@%</code>), that you intend
to use as globals in components.  Normally global variables are
forbidden by <code>strict</code>, but any variable mentioned in this list is
granted a reprieve via a ``use vars'' statement. For example:</p>
<pre>
    allow_globals =&gt; [qw($DBH %session)]</pre>
<p>In a mod_perl environment, <code>$r</code> (the request object) is automatically
added to this list.</p>
<p>
</p>
<h2><A NAME="apache_status_title">apache_status_title</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_apache_status_">Perl name:           apache_status_title</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonapaches">Apache name:         MasonApacheStatusTitle</a></strong>

<li><strong><A NAME="item_type_in_httpd_2econf_3a_str">Type in httpd.conf:  string</a></strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason status</a></strong>

<li><strong><A NAME="item_belongs_to_3a_html_3a_3amas">Belongs to:          <code>HTML::Mason::ApacheHandler</code></a></strong>

</ul>
<p>Title that you want this ApacheHandler to appear as under
Apache::Status.  Default is ``HTML::Mason status''.  This is useful if
you create more than one ApacheHandler object and want them all
visible via Apache::Status.</p>
<p>
</p>
<h2><A NAME="args_method">args_method</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_args_method">Perl name:           args_method</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonargsmet">Apache name:         MasonArgsMethod</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_mod_perl">Default:             mod_perl</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::ApacheHandler</code></strong>

</ul>
<p>Method to use for unpacking GET and POST arguments. The valid options
are 'CGI' and 'mod_perl'; these indicate that a <code>CGI.pm</code> or
<code>Apache::Request</code> object (respectively) will be created for the
purposes of argument handling.</p>
<p>'mod_perl' is the default under mod_perl-1 and requires that you have 
installed the <code>Apache::Request</code> package.  Under mod_perl-2, the default
is 'CGI' because <code>Apache2::Request</code> is still in development.</p>
<p>If args_method is 'mod_perl', the <code>$r</code> global is upgraded to an
Apache::Request object. This object inherits all Apache methods and
adds a few of its own, dealing with parameters and file uploads.  See
<code>Apache::Request</code> for more information.</p>
<p>If the args_method is 'CGI', the Mason request object (<code>$m</code>) will have a
method called <code>cgi_object</code> available.  This method returns the CGI
object used for argument processing.</p>
<p>While Mason will load <code>Apache::Request</code> or <code>CGI</code> as needed at runtime, it
is recommended that you preload the relevant module either in your
<em>httpd.conf</em> or <em>handler.pl</em> file, as this will save some memory.</p>
<p>
</p>
<h2><A NAME="auto_send_headers">auto_send_headers</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_auto_send_head">Perl name:           auto_send_headers</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonautosen">Apache name:         MasonAutoSendHeaders</a></strong>

<li><strong><A NAME="item_type_in_httpd_2econf_3a_boo">Type in httpd.conf:  boolean</a></strong>

<li><strong><A NAME="item_default_3a_1">Default:             1</a></strong>

<li><strong><A NAME="item_belongs_to_3a_html_3a_3amas">Belongs to:          <code>HTML::Mason::Request::ApacheHandler</code></a></strong>

</ul>
<A NAME="item_auto_send_headers"></a><p>True or false, default is true.  Indicates whether Mason should
automatically send HTTP headers before sending content back to the
client. If you set to false, you should call <code>$r-&gt;send_http_header</code>
manually.</p>
<p>See the <A HREF="Devel.html#sending_http_headers">sending HTTP headers</a> section of the developer's manual for more details about the automatic
header feature.</p>
<p>NOTE: This parameter has no effect under mod_perl-2, since calling
<code>$r-&gt;send_http_header</code> is no longer needed.</p>
<p>
</p>
<h2><A NAME="autoflush">autoflush</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_autoflush">Perl name:           autoflush</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonautoflu">Apache name:         MasonAutoflush</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong><A NAME="item_default_3a_0">Default:             0</a></strong>

<li><strong><A NAME="item_belongs_to_3a_html_3a_3amas">Belongs to:          <code>HTML::Mason::Request</code></a></strong>

</ul>
<p>True or false, default is false. Indicates whether to flush the output
buffer (<code>$m-&gt;flush_buffer</code>) after every string is output. Turn on
autoflush if you need to send partial output to the client, for
example in a progress meter.</p>
<p>As of Mason 1.3, autoflush will only work if <A HREF="Params.html#enable_autoflush">enable_autoflush</a> has
been set.  Components can be compiled more efficiently if they don't
have to check for autoflush. Before using autoflush you might consider
whether a few manual <code>$m-&gt;flush_buffer</code> calls would work nearly
as well.</p>
<p>
</p>
<h2><A NAME="autohandler_name">autohandler_name</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_autohandler_na">Perl name:           autohandler_name</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonautohan">Apache name:         MasonAutohandlerName</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_autohandler">Default:             autohandler</a></strong>

<li><strong><A NAME="item_belongs_to_3a_html_3a_3amas">Belongs to:          <code>HTML::Mason::Interp</code></a></strong>

</ul>
<p>File name used for
<A HREF="Devel.html#autohandlers">autohandlers</a>. Default is
``autohandler''.  If this is set to an empty string (``'') then
autohandlers are turned off entirely.</p>
<p>
</p>
<h2><A NAME="buffer_preallocate_size">buffer_preallocate_size</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_buffer_preallo">Perl name:           buffer_preallocate_size</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonbufferp">Apache name:         MasonBufferPreallocateSize</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong>Default:             0</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<A NAME="item_buffer_preallocate_size"></a><p>Number of bytes to preallocate in the output buffer for each request.
Defaults to 0. Setting this to, say, your maximum page size (or close
to it) can reduce the number of reallocations Perl performs as
components add to the output buffer.</p>
<p>
</p>
<h2><A NAME="code_cache_max_size">code_cache_max_size</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_code_cache_max">Perl name:           code_cache_max_size</a></strong>

<li><strong><A NAME="item_apache_name_3a_masoncodecac">Apache name:         MasonCodeCacheMaxSize</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_unlimited">Default:             unlimited</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<A NAME="item_code_cache_max_size"></a><p>Specifies the maximum number of components that should be held in the
in-memory code cache. The default is 'unlimited', meaning no
components will ever be discarded; Mason can perform certain
optimizations in this mode. Setting this to zero disables the code
cache entirely. See the <A HREF="Admin.html#code_cache">code cache</a>
section of the administrator's manual for further details.</p>
<p>
</p>
<h2><A NAME="comp_class">comp_class</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_comp_class">Perl name:           comp_class</a></strong>

<li><strong><A NAME="item_apache_name_3a_masoncompcla">Apache name:         MasonCompClass</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason::Component</a></strong>

<li><strong><A NAME="item_belongs_to_3a_html_3a_3amas">Belongs to:          <code>HTML::Mason::Compiler::ToObject</code></a></strong>

</ul>
<p>The class into which component objects are blessed.  This defaults to
<a HREF="Component.html">HTML::Mason::Component</a>.</p>
<p>
</p>
<h2><A NAME="comp_root">comp_root</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_comp_root">Perl name:           comp_root</a></strong>

<li><strong><A NAME="item_apache_name_3a_masoncomproo">Apache name:         MasonCompRoot</a></strong>

<li><strong>Type in httpd.conf:  list</strong>

<li><strong><A NAME="item_default_3a_varies">Default:             Varies</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<A NAME="item_comp_root"></a><p>The component root marks the top of your component hierarchy and
defines how component paths are translated into real file paths. For
example, if your component root is <em>/usr/local/httpd/docs</em>, a component
path of <em>/products/index.html</em> translates to the file
<em>/usr/local/httpd/docs/products/index.html</em>.</p>
<p>Under <a HREF="ApacheHandler.html">Apache</a> and
<a HREF="CGIHandler.html">CGI</a>, comp_root defaults to the server's
document root. In standalone mode comp_root defaults to the current
working directory.</p>
<p>This parameter may be either a scalar or an array reference.  If it is
a scalar, it should be a filesystem path indicating the component
root. If it is an array reference, it should be of the following form:</p>
<pre>
 [ [ foo =&gt; '/usr/local/foo' ],
   [ bar =&gt; '/usr/local/bar' ] ]</pre>
<p>This is an array of two-element array references, not a hash.  The
``keys'' for each path must be unique and their ``values'' must be
filesystem paths.  These paths will be searched in the provided order
whenever a component path is resolved. For example, given the above
component roots and a component path of <em>/products/index.html</em>, Mason
would search first for <em>/usr/local/foo/products/index.html</em>, then for
<em>/usr/local/bar/products/index.html</em>.</p>
<p>The keys are used in several ways. They help to distinguish component
caches and object files between different component roots, and they
appear in the <code>title()</code> of a component.</p>
<p>When you specify a single path for a component root, this is actually
translated into</p>
<pre>
  [ [ MAIN =&gt; path ] ]</pre>
<p>If you have turned on <A HREF="Params.html#dynamic_comp_root">dynamic_comp_root</a>, you may modify the
component <code>root(s)</code> of an interpreter between requests by calling
<code>$interp-&gt;comp_root</code> with a value. However, the path associated
with any given key may not change between requests. For example,
if the initial component root is</p>
<pre>
 [ [ foo =&gt; '/usr/local/foo' ],
   [ bar =&gt; '/usr/local/bar' ], ]</pre>
<p>then it may not be changed to</p>
<pre>
 [ [ foo =&gt; '/usr/local/bar' ],
   [ bar =&gt; '/usr/local/baz' ],</pre>
<p>but it may be changed to</p>
<pre>
 [ [ foo   =&gt; '/usr/local/foo' ],
   [ blarg =&gt; '/usr/local/blarg' ] ]</pre>
<p>In other words, you may add or remove key/path pairs but not modify an
already-used key/path pair. The reason for this restriction is that
the interpreter maintains a component cache per key that would become
invalid if the associated paths were to change.</p>
<p>
</p>
<h2><A NAME="compiler_class">compiler_class</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_compiler_class">Perl name:           compiler_class</a></strong>

<li><strong><A NAME="item_apache_name_3a_masoncompile">Apache name:         MasonCompilerClass</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason::Compiler::ToObject</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>The class to use when creating a compiler. Defaults to
<a HREF="Compiler.html">HTML::Mason::Compiler</a>.</p>
<p>
</p>
<h2><A NAME="component_error_handler">component_error_handler</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_component_erro">Perl name:           component_error_handler</a></strong>

<li><strong><A NAME="item_apache_name_3a_masoncompone">Apache name:         MasonComponentErrorHandler</a></strong>

<li><strong><A NAME="item_type_in_httpd_2econf_3a_cod">Type in httpd.conf:  code</a></strong>

<li><strong><A NAME="item_my">Default:             sub { package HTML::Mason::Exceptions; use warnings; use strict 'refs'; <code>my($err)</code> = @_; return unless $err; if (UNIVERSAL::can($err, 'rethrow')) { $err-&gt;rethrow; } elsif (ref $err) { die $err; } 'HTML::Mason::Exception'-&gt;throw('error', $err); }</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>A code reference used to handle errors thrown during component
compilation or runtime. By default, this is a subroutine that turns
non-exception object errors in components into exceptions. If this
parameter is set to a false value, these errors are simply rethrown
as-is.</p>
<p>Turning exceptions into objects can be expensive, since this will
cause the generation of a stack trace for each error. If you are using
strings or unblessed references as exceptions in your code, you may
want to turn this off as a performance boost.</p>
<p>
</p>
<h2><A NAME="data_cache_api">data_cache_api</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_data_cache_api">Perl name:           data_cache_api</a></strong>

<li><strong><A NAME="item_apache_name_3a_masondatacac">Apache name:         MasonDataCacheApi</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_1_2e1">Default:             1.1</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>The <code>$m-&gt;cache</code> API to use:</p>
<ul>
<li>
<p>'1.1', the default, indicates a <code>Cache::Cache</code> based API.</p>
</li>
<li>
<p>'chi' indicates a <code>CHI</code> based API.</p>
</li>
<li>
<p>'1.0' indicates the custom cache API used in Mason 1.0x and
earlier. This compatibility layer is provided as a convenience for
users upgrading from older versions of Mason, but will not be
supported indefinitely.</p>
</li>
</ul>
<p>
</p>
<h2><A NAME="data_cache_defaults">data_cache_defaults</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_data_cache_def">Perl name:           data_cache_defaults</a></strong>

<li><strong><A NAME="item_apache_name_3a_masondatacac">Apache name:         MasonDataCacheDefaults</a></strong>

<li><strong><A NAME="item_type_in_httpd_2econf_3a_has">Type in httpd.conf:  hash_list</a></strong>

<li><strong><A NAME="item_default_3a_none">Default:             None</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>A hash reference of default options to use for the <code>$m-&gt;cache</code>
command.  For example, to use Cache::Cache's <code>MemoryCache</code>
implementation by default:</p>
<pre>
    data_cache_defaults =&gt; {cache_class =&gt; 'MemoryCache'}</pre>
<p>To use the CHI <code>FastMmap</code> driver by default:</p>
<pre>
    data_cache_api      =&gt; 'CHI',
    data_cache_defaults =&gt; {driver =&gt; 'FastMmap'},</pre>
<p>These settings are overriden by options given to particular
<code>$m-&gt;cache</code> calls.</p>
<p>
</p>
<h2><A NAME="data_dir">data_dir</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_data_dir">Perl name:           data_dir</a></strong>

<li><strong><A NAME="item_apache_name_3a_masondatadir">Apache name:         MasonDataDir</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>The data directory is a writable directory that Mason uses for various
features and optimizations: for example, component object files and
data cache files. Mason will create the directory on startup, if necessary, and set its
permissions according to the web server User/Group.</p>
<p>Under <a HREF="ApacheHandler.html">Apache</a>, data_dir defaults to a
directory called ``mason'' under the Apache server root. You will
need to change this on certain systems that assign a high-level
server root such as <em>/usr</em>!</p>
<p>In non-Apache environments, data_dir has no default. If it is left
unspecified, Mason will not use <A HREF="Admin.html#object_files">object files</a>, and the default
<A HREF="Request.html#item_cache">data cache class</a> will be
<code>MemoryCache</code> instead of <code>FileCache</code>.</p>
<p>
</p>
<h2><A NAME="decline_dirs">decline_dirs</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_decline_dirs">Perl name:           decline_dirs</a></strong>

<li><strong><A NAME="item_apache_name_3a_masondecline">Apache name:         MasonDeclineDirs</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong>Default:             1</strong>

<li><strong>Belongs to:          <code>HTML::Mason::ApacheHandler</code></strong>

</ul>
<p>True or false, default is true. Indicates whether Mason should decline
directory requests, leaving Apache to serve up a directory index or a
<code>FORBIDDEN</code> error as appropriate. See the <A HREF="Admin.html#allowing_directory_requests">allowing directory requests</a> section of the administrator's manual
for more information about handling directories with Mason.</p>
<p>
</p>
<h2><A NAME="default_escape_flags">default_escape_flags</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_default_escape">Perl name:           default_escape_flags</a></strong>

<li><strong><A NAME="item_apache_name_3a_masondefault">Apache name:         MasonDefaultEscapeFlags</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong>Default:             []</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler</code></strong>

</ul>
<p>Escape flags to apply to all &lt;% %&gt; expressions by default. The current
valid flags are</p>
<pre>
    h - escape for HTML ('&lt;' =&gt; '&amp;lt;', etc.)
    u - escape for URL (':' =&gt; '%3A', etc.)</pre>
<p>The developer can override default escape flags on a per-expression
basis; see the <A HREF="Devel.html#escaping_expressions">escaping expressions</a> section of the developer's manual.</p>
<p>If you want to set <em>multiple</em> flags as the default, this should be
given as a reference to an array of flags.</p>
<p>
</p>
<h2><A NAME="define_args_hash">define_args_hash</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_define_args_ha">Perl name:           define_args_hash</a></strong>

<li><strong><A NAME="item_apache_name_3a_masondefinea">Apache name:         MasonDefineArgsHash</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_auto">Default:             auto</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler::ToObject</code></strong>

</ul>
<p>One of ``always'', ``auto'', or ``never''.  This determines whether or not
an <code>%ARGS</code> hash is created in components.  If it is set to ``always'',
one is always defined.  If set to ``never'', it is never defined.</p>
<p>The default, ``auto'', will cause the hash to be defined only if some
part of the component contains the string ``ARGS''.  This is somewhat
crude, and may result in some false positives, but this is preferable
to false negatives.</p>
<p>Not defining the args hash means that we can avoid copying component
arguments, which can save memory and slightly improve execution speed.</p>
<p>
</p>
<h2><A NAME="dhandler_name">dhandler_name</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_dhandler_name">Perl name:           dhandler_name</a></strong>

<li><strong><A NAME="item_apache_name_3a_masondhandle">Apache name:         MasonDhandlerName</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_dhandler">Default:             dhandler</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>File name used for <A HREF="Devel.html#dhandlers">dhandlers</a>. Default
is ``dhandler''.  If this is set to an empty string (``'') then dhandlers
are turned off entirely.</p>
<p>
</p>
<h2><A NAME="dynamic_comp_root">dynamic_comp_root</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_dynamic_comp_r">Perl name:           dynamic_comp_root</a></strong>

<li><strong><A NAME="item_apache_name_3a_masondynamic">Apache name:         MasonDynamicCompRoot</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong>Default:             0</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>True or false, defaults to false. Indicates whether the <A HREF="Params.html#comp_root">comp_root</a>
can be modified on this interpreter between requests. Mason can
perform a few optimizations with a fixed component root, so you
should only set this to true if you actually need it.</p>
<p>
</p>
<h2><A NAME="enable_autoflush">enable_autoflush</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_enable_autoflu">Perl name:           enable_autoflush</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonenablea">Apache name:         MasonEnableAutoflush</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong>Default:             1</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler</code></strong>

</ul>
<p>True or false, default is true. Indicates whether components are
compiled with support for <A HREF="Params.html#autoflush">autoflush</a>. The component can be compiled
to a more efficient form if it does not have to check for autoflush
mode, so you should set this to 0 if you can.</p>
<p>
</p>
<h2><A NAME="error_format">error_format</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_error_format">Perl name:           error_format</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonerrorfo">Apache name:         MasonErrorFormat</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong>Default:             Varies</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>Indicates how errors are formatted. The built-in choices are</p>
<ul>
<li>
<p><em>brief</em> - just the error message with no trace information</p>
</li>
<li>
<p><em>text</em> - a multi-line text format</p>
</li>
<li>
<p><em>line</em> - a single-line text format, with different pieces of
information separated by tabs (useful for log files)</p>
</li>
<li>
<p><em>html</em> - a fancy html format</p>
</li>
</ul>
<p>The default format under <a HREF="ApacheHandler.html">Apache</a> and
<a HREF="CGIHandler.html">CGI</a> is either <em>line</em> or <em>html</em> depending
on whether the error mode is <em>fatal</em> or <em>output</em>, respectively. The
default for standalone mode is <em>text</em>.</p>
<p>The formats correspond to <code>HTML::Mason::Exception</code> methods named
as_<em>format</em>. You can define your own format by creating an
appropriately named method; for example, to define an ``xml'' format,
create a method <code>HTML::Mason::Exception::as_xml</code> patterned after one of
the built-in methods.</p>
<p>
</p>
<h2><A NAME="error_mode">error_mode</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_error_mode">Perl name:           error_mode</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonerrormo">Apache name:         MasonErrorMode</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong>Default:             Varies</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>Indicates how errors are returned to the caller.  The choices are
<em>fatal</em>, meaning die with the error, and <em>output</em>, meaning output
the error just like regular output.</p>
<p>The default under <a HREF="ApacheHandler.html">Apache</a> and
<a HREF="CGIHandler.html">CGI</a> is <em>output</em>, causing the error to be
displayed in the browser.  The default for standalone mode is
<em>fatal</em>.</p>
<p>
</p>
<h2><A NAME="escape_flags">escape_flags</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_escape_flags">Perl name:           escape_flags</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonescapef">Apache name:         MasonEscapeFlags</a></strong>

<li><strong>Type in httpd.conf:  hash_list</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>A hash reference of escape flags to set for this object.  See the
section on the <A HREF="Interp.html#item_set_escape">set_escape method</a> for more details.</p>
<p>
</p>
<h2><A NAME="ignore_warnings_expr">ignore_warnings_expr</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_ignore_warning">Perl name:           ignore_warnings_expr</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonignorew">Apache name:         MasonIgnoreWarningsExpr</a></strong>

<li><strong><A NAME="item_type_in_httpd_2econf_3a_reg">Type in httpd.conf:  regex</a></strong>

<li><strong><A NAME="item_default_3a_qr_2fsubroutine_">Default:             qr/Subroutine .* redefined/i</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>Regular expression indicating which warnings to ignore when loading
components. Any warning that is not ignored will prevent the
component from being loaded and executed. For example:</p>
<pre>
    ignore_warnings_expr =&gt;
        'Global symbol.*requires explicit package'</pre>
<p>If set to undef, all warnings are heeded. If set to '.', warnings
are turned off completely as a specially optimized case.</p>
<p>By default, this is set to 'Subroutine .* redefined'.  This allows you
to declare global subroutines inside &lt;%once&gt; sections and not receive
an error when the component is reloaded.</p>
<p>
</p>
<h2><A NAME="in_package">in_package</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_in_package">Perl name:           in_package</a></strong>

<li><strong><A NAME="item_apache_name_3a_masoninpacka">Apache name:         MasonInPackage</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason::Commands</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler::ToObject</code></strong>

</ul>
<p>This is the package in which a component's code is executed.  For
historical reasons, this defaults to <code>HTML::Mason::Commands</code>.</p>
<p>
</p>
<h2><A NAME="interp_class">interp_class</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_interp_class">Perl name:           interp_class</a></strong>

<li><strong><A NAME="item_apache_name_3a_masoninterpc">Apache name:         MasonInterpClass</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason::Interp</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::ApacheHandler</code></strong>

</ul>
<p>The class to use when creating a interpreter. Defaults to
<a HREF="Interp.html">HTML::Mason::Interp</a>.</p>
<p>
</p>
<h2><A NAME="lexer_class">lexer_class</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_lexer_class">Perl name:           lexer_class</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonlexercl">Apache name:         MasonLexerClass</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason::Lexer</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler</code></strong>

</ul>
<p>The class to use when creating a lexer. Defaults to <a HREF="Lexer.html">HTML::Mason::Lexer</a>.</p>
<p>
</p>
<h2><A NAME="max_recurse">max_recurse</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_max_recurse">Perl name:           max_recurse</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonmaxrecu">Apache name:         MasonMaxRecurse</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_32">Default:             32</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>The maximum recursion depth for the component stack, for the request
stack, and for the inheritance stack. An error is signalled if the
maximum is exceeded.  Default is 32.</p>
<p>
</p>
<h2><A NAME="named_component_subs">named_component_subs</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_named_componen">Perl name:           named_component_subs</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonnamedco">Apache name:         MasonNamedComponentSubs</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong>Default:             0</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler::ToObject</code></strong>

</ul>
<p>When compiling a component, use uniquely named subroutines for the a
component's body, subcomponents, and methods. Doing this allows you to
effectively profile Mason components. Without this, all components
simply show up as __ANON__ or something similar in the profiler.</p>
<p>
</p>
<h2><A NAME="object_file_extension">object_file_extension</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_object_file_ex">Perl name:           object_file_extension</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonobjectf">Apache name:         MasonObjectFileExtension</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a__2eobj">Default:             .obj</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>Extension to add to the end of object files. Default is ``.obj''.</p>
<p>
</p>
<h2><A NAME="out_method">out_method</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_out_method">Perl name:           out_method</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonoutmeth">Apache name:         MasonOutMethod</a></strong>

<li><strong>Type in httpd.conf:  code</strong>

<li><strong><A NAME="item_default_3a_print_to_stdout">Default:             Print to STDOUT</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>Indicates where to send output. If out_method is a reference to a
scalar, output is appended to the scalar.  If out_method is a
reference to a subroutine, the subroutine is called with each output
string. For example, to send output to a file called ``mason.out'':</p>
<pre>
    my $fh = new IO::File &quot;&gt;mason.out&quot;;
    ...
    out_method =&gt; sub { $fh-&gt;print($_[0]) }</pre>
<p>By default, out_method prints to standard output. Under
<a HREF="ApacheHandler.html">Apache</a>, standard output is
redirected to <code>$r-&gt;print</code>.</p>
<p>
</p>
<h2><A NAME="plugins">plugins</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_plugins">Perl name:           plugins</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonplugins">Apache name:         MasonPlugins</a></strong>

<li><strong>Type in httpd.conf:  list</strong>

<li><strong>Default:             []</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Request</code></strong>

</ul>
<p>An array of plugins that will be called at various stages of request
processing.  Please see <a HREF="Plugin.html">HTML::Mason::Plugin</a> for
details.</p>
<p>
</p>
<h2><A NAME="postamble">postamble</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_postamble">Perl name:           postamble</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonpostamb">Apache name:         MasonPostamble</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler::ToObject</code></strong>

</ul>
<p>Text given for this parameter is placed at the end of each
component. See also <A HREF="Params.html#preamble">preamble</a>.  The request will be available as
<code>$m</code> in postamble code.</p>
<p>
</p>
<h2><A NAME="postprocess_perl">postprocess_perl</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_postprocess_pe">Perl name:           postprocess_perl</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonpostpro">Apache name:         MasonPostprocessPerl</a></strong>

<li><strong>Type in httpd.conf:  code</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler</code></strong>

</ul>
<p>Sub reference that is called to postprocess the Perl portion of a
compiled component, just before it is assembled into its final
subroutine form.  The sub is called with a single parameter, a scalar
reference to the Perl portion of the component.  The sub is expected
to process the string in-place. See also
<A HREF="Params.html#preprocess">preprocess</a> and <A HREF="Params.html#postprocess_text">postprocess_text</a>.</p>
<p>
</p>
<h2><A NAME="postprocess_text">postprocess_text</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_postprocess_te">Perl name:           postprocess_text</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonpostpro">Apache name:         MasonPostprocessText</a></strong>

<li><strong>Type in httpd.conf:  code</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler</code></strong>

</ul>
<p>Sub reference that is called to postprocess the text portion of a
compiled component, just before it is assembled into its final
subroutine form.  The sub is called with a single parameter, a scalar
reference to the text portion of the component.  The sub is expected
to process the string in-place. See also
<A HREF="Params.html#preprocess">preprocess</a> and <A HREF="Params.html#postprocess_perl">postprocess_perl</a>.</p>
<p>
</p>
<h2><A NAME="preamble">preamble</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_preamble">Perl name:           preamble</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonpreambl">Apache name:         MasonPreamble</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler::ToObject</code></strong>

</ul>
<p>Text given for this parameter is placed at the beginning of each
component, but after the execution of any <code>&lt;%once&gt;</code> block. See
also <A HREF="Params.html#postamble">postamble</a>. The request will be available as <code>$m</code> in preamble
code.</p>
<p>
</p>
<h2><A NAME="preloads">preloads</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_preloads">Perl name:           preloads</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonpreload">Apache name:         MasonPreloads</a></strong>

<li><strong>Type in httpd.conf:  list</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>A list of component paths, optionally with glob wildcards, to load
when the interpreter initializes. e.g.</p>
<pre>
    preloads =&gt; ['/foo/index.html','/bar/*.pl']</pre>
<p>Default is the empty list.  For maximum performance, this should only
be used for components that are frequently viewed and rarely updated.
See the <A HREF="Admin.html#preloading_components">preloading components</a> section of the administrator's manual for further details.</p>
<p>As mentioned in the developer's manual, a component's <code>&lt;%once&gt;</code>
section is executed when it is loaded.  For preloaded components, this
means that this section will be executed before a Mason or Apache
request exist, so preloading a component that uses <code>$m</code> or <code>$r</code> in a
<code>&lt;%once&gt;</code> section will fail.</p>
<p>
</p>
<h2><A NAME="preprocess">preprocess</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_preprocess">Perl name:           preprocess</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonpreproc">Apache name:         MasonPreprocess</a></strong>

<li><strong>Type in httpd.conf:  code</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler</code></strong>

</ul>
<p>Sub reference that is called to preprocess each component before the compiler does
it's magic.  The sub is called with a single parameter, a scalar reference
to the script.  The sub is expected to process the script in-place.   This is
one way to extend the HTML::Mason syntax with new tags, etc., although a much
more flexible way is to subclass the Lexer or Compiler class. See also
<A HREF="Params.html#postprocess_text">postprocess_text</a> and <A HREF="Params.html#postprocess_perl">postprocess_perl</a>.</p>
<p>
</p>
<h2><A NAME="request_class">request_class</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_request_class">Perl name:           request_class</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonrequest">Apache name:         MasonRequestClass</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason::Request</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>The class to use when creating requests. Defaults to
<a HREF="Request.html">HTML::Mason::Request</a>.</p>
<p>
</p>
<h2><A NAME="resolver_class">resolver_class</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_resolver_class">Perl name:           resolver_class</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonresolve">Apache name:         MasonResolverClass</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason::Resolver::File</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>The class to use when creating a resolver. Defaults to
<a HREF="Resolver/File.html">HTML::Mason::Resolver::File</a>.</p>
<p>
</p>
<h2><A NAME="static_source">static_source</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_static_source">Perl name:           static_source</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonstatics">Apache name:         MasonStaticSource</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong>Default:             0</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>True or false, default is false. When false, Mason checks the
timestamp of the component source file each time the component is used
to see if it has changed. This provides the instant feedback for
source changes that is expected for development.  However it does
entail a file stat for each component executed.</p>
<p>When true, Mason assumes that the component source tree is unchanging:
it will not check component source files to determine if the memory
cache or object file has expired.  This can save many file stats per
request. However, in order to get Mason to recognize a component
source change, you must flush the memory cache and remove object files.
See <A HREF="Params.html#static_source_touch_file">static_source_touch_file</a> for one easy way to arrange this.</p>
<p>We recommend turning this mode on in your production sites if
possible, if performance is of any concern.</p>
<p>
</p>
<h2><A NAME="static_source_touch_file">static_source_touch_file</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_static_source_">Perl name:           static_source_touch_file</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonstatics">Apache name:         MasonStaticSourceTouchFile</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong>Default:             None</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>Specifies a filename that Mason will check once at the beginning of
of every request. When the file timestamp changes, Mason will (1) clear
its in-memory component cache, and (2) remove object files if
they have not already been deleted by another process.</p>
<p>This provides a convenient way to implement <A HREF="Params.html#static_source">static_source</a> mode.
All you need to do is make sure that a single file gets touched
whenever components change. For Mason's part, checking a single
file at the beginning of a request is much cheaper than checking
every component file when static_source=0.</p>
<p>
</p>
<h2><A NAME="subcomp_class">subcomp_class</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_subcomp_class">Perl name:           subcomp_class</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonsubcomp">Apache name:         MasonSubcompClass</a></strong>

<li><strong>Type in httpd.conf:  string</strong>

<li><strong><A NAME="item_default_3a_html_3a_3amason_">Default:             HTML::Mason::Component::Subcomponent</a></strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler::ToObject</code></strong>

</ul>
<p>The class into which subcomponent objects are blessed.  This defaults
to <a HREF="Component/Subcomponent.html">HTML::Mason::Component::Subcomponent</a>.</p>
<p>
</p>
<h2><A NAME="use_object_files">use_object_files</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_use_object_fil">Perl name:           use_object_files</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonuseobje">Apache name:         MasonUseObjectFiles</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong>Default:             1</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Interp</code></strong>

</ul>
<p>True or false, default is true.  Specifies whether Mason creates
object files to save the results of component parsing. You may want to
turn off object files for disk space reasons, but otherwise this
should be left alone.</p>
<p>
</p>
<h2><A NAME="use_source_line_numbers">use_source_line_numbers</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_use_source_lin">Perl name:           use_source_line_numbers</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonusesour">Apache name:         MasonUseSourceLineNumbers</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong>Default:             1</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler</code></strong>

</ul>
<p>True or false, default is true. Indicates whether component line
numbers that appear in error messages, stack traces, etc. are in terms
of the source file instead of the object file. Mason does this by
inserting '#line' directives into compiled components.  While source
line numbers are more immediately helpful, object file line numbers
may be more appropriate for in-depth debugging sessions.</p>
<p>
</p>
<h2><A NAME="use_strict">use_strict</a></h2>
<ul>
<li><strong><A NAME="item_perl_name_3a_use_strict">Perl name:           use_strict</a></strong>

<li><strong><A NAME="item_apache_name_3a_masonusestri">Apache name:         MasonUseStrict</a></strong>

<li><strong>Type in httpd.conf:  boolean</strong>

<li><strong>Default:             1</strong>

<li><strong>Belongs to:          <code>HTML::Mason::Compiler::ToObject</code></strong>

</ul>
<p>True or false, default is true. Indicates whether or not a given
component should <code>use strict</code>.</p>

</body>

</html>