| 1 |
# |
| 2 |
# run this under mod_perl / Apache::Registry |
| 3 |
# |
| 4 |
|
| 5 |
|
| 6 |
use Embperl ; |
| 7 |
|
| 8 |
my($r) = @_; |
| 9 |
|
| 10 |
$Embperl::DebugDefault = 811005 ; |
| 11 |
|
| 12 |
eval "use Apache2::compat" ; |
| 13 |
|
| 14 |
$r -> status (200) ; |
| 15 |
$r -> send_http_header () ; |
| 16 |
|
| 17 |
print "<HTML><TITLE>Test for Embperl::Req::SetupSession</TITLE><BODY>\n" ; |
| 18 |
|
| 19 |
|
| 20 |
my $session = Embperl::Req::SetupSession ($r) ; |
| 21 |
|
| 22 |
$off = 0 ; |
| 23 |
#$off-- if ($Embperl::SessionMgnt == 2 && !defined (tied (%$session) -> getid)) ; |
| 24 |
@ks = grep (!/^_/, sort (keys %$session)) ; $num = keys (%$session) - $#ks - 1 + $off ; |
| 25 |
|
| 26 |
foreach (@ks) |
| 27 |
{ |
| 28 |
print "$_ = $session->{$_} <BR>\n" ; |
| 29 |
} |
| 30 |
|
| 31 |
$tst1 = '<P>Here is some text inside of Execute</P>' ; |
| 32 |
|
| 33 |
|
| 34 |
Embperl::Execute ({input => \$tst1, |
| 35 |
mtime => 1, |
| 36 |
inputfile => 'Some text session test', |
| 37 |
}) ; |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
print "</BODY></HTML>\n" ; |