File: MOD_PERL.pm

package info (click to toggle)
libinline-java-perl 0.67-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 716 kB
  • sloc: perl: 3,817; java: 2,621; makefile: 35; sh: 1
file content (46 lines) | stat: -rwxr-xr-x 773 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/perl

package t::MOD_PERL ;

use strict ;

use CGI ;

use Inline (
	Java => '/home/patrickl/DEV/Inline-Java/t/counter.java',
	DIRECTORY => '/home/patrickl/DEV/Inline-Java/_Inline_web_test',
	NAME => 't::MOD_PERL',
	SHARED_JVM => 1,
) ;


use Apache2::RequestRec ;
use Apache2::RequestIO ;
use Apache2::Const qw(:common) ;


my $cnt = new t::MOD_PERL::counter() ;


sub handler {
	my $r = shift ;
	
	$r->content_type('text/html') ;

	my $gnb = $cnt->gincr() ;
	my $nb = $cnt->incr() ;

	my $q = new CGI() ;
	print 
		$q->start_html() .
	    "Inline-Java " . $Inline::Java::VERSION . "<BR><BR>" .
		"Inline-Java says this page received $gnb hits!<BR>" .
		"Inline-Java says this MOD_PERL ($$) served $nb of those hits." .
		$q->end_html() ;

	return OK ;
}


1 ;