| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
package t::CGI ; |
| 4 |
|
| 5 |
use strict ; |
| 6 |
|
| 7 |
use CGI ; |
| 8 |
use CGI::Carp qw(fatalsToBrowser) ; |
| 9 |
|
| 10 |
use Inline ( |
| 11 |
Java => '/home/patrickl/DEV/Inline-Java/t/counter.java', |
| 12 |
DIRECTORY => '/home/patrickl/DEV/Inline-Java/_Inline_web_test', |
| 13 |
SHARED_JVM => 1, |
| 14 |
NAME => 't::CGI', |
| 15 |
) ; |
| 16 |
|
| 17 |
BEGIN { |
| 18 |
$t::CGI::cnt = new t::CGI::counter() ; |
| 19 |
} |
| 20 |
|
| 21 |
my $gnb = $t::CGI::cnt->gincr() ; |
| 22 |
my $nb = $t::CGI::cnt->incr() ; |
| 23 |
|
| 24 |
my $q = new CGI() ; |
| 25 |
print "Content-type: text/html\n\n" ; |
| 26 |
print |
| 27 |
$q->start_html() . |
| 28 |
"Inline-Java " . $Inline::Java::VERSION . "<BR><BR>" . |
| 29 |
"Inline-Java says this page received $gnb hits!<BR>" . |
| 30 |
"Inline-Java says this CGI ($$) served $nb of those hits." . |
| 31 |
$q->end_html() ; |
| 32 |
|
| 33 |
1 ; |