File: CGI.cgi

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 (33 lines) | stat: -rwxr-xr-x 676 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
#!/usr/bin/perl

package t::CGI ;

use strict ;

use CGI ;
use CGI::Carp qw(fatalsToBrowser) ;

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

BEGIN {
	$t::CGI::cnt = new t::CGI::counter() ;
}

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

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

1 ;