stas 02/05/12 00:29:30
Modified: src/docs/1.0/guide snippets.pod
Log:
port the args passing recipe from the modperl faq
Revision Changes Path
1.9 +21 -0 modperl-docs/src/docs/1.0/guide/snippets.pod
Index: snippets.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/1.0/guide/snippets.pod,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- snippets.pod 11 May 2002 11:54:44 -0000 1.8
+++ snippets.pod 12 May 2002 07:29:30 -0000 1.9
@@ -1198,6 +1198,27 @@
After all, it's a little awkward to need a C<LogHandler> to clean up
after ourselves....
+
+=head1 Passing Arguments to a SSI script
+
+Consider the following C<Apache::Include> snippet:
+
+ <!--#perl sub="Apache::Include" arg="/perl/ssi.pl" -->
+
+Now if you want to pass arguments, you cannot do that with
+C<Apache::Include>. The solution is to define a subroutine that's
+pulled in at the startup:
+
+ sub My::ssi {
+ my($r, $one, $two, $three) = @_;
+ ...
+ }
+
+In the html file:
+
+ <!--#perl sub="My::ssi" arg="one" arg="two" arg="three" -->
+
+
=head1 Setting Environment Variables For Scripts Called From CGI.
Perl uses C<sh()> for its C<system()> and C<open()> calls. So if you
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]