File: test.spl

package info (click to toggle)
libapache2-mod-perl2 2.0.9~1624218-2%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 11,912 kB
  • ctags: 4,588
  • sloc: perl: 95,064; ansic: 14,527; makefile: 49; sh: 18
file content (23 lines) | stat: -rwxr-xr-x 581 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;

#XXX: this test needs to be more robust.
#various output buffers spread across multiple prints
#more mod_include features mixed and checking that the output
#is *exactly* what we expected, not just matching a few patterns.

print "Content-type: text/html\n\n";

my $r = shift;

my $test_string = 'Perl-SSI';

$r->subprocess_env->set(MY_TEST => $test_string);

print <<EOF;
Hello World from <!--#echo var="SERVER_ADMIN" --><br>
Local date is <!--#echo var="DATE_LOCAL" --><br>
Brought to you by <!--#echo var="MY_TEST" -->
<!--#echo var="SERVER_SOFTWARE" -->
<br>
EOF