diff index.pl @ 0:477258d09353 boosterpack

[svn r1] initial import
author robert
date Sun, 30 Aug 2009 02:19:26 -0400
parents
children d7dd496a4fa6
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/index.pl	Sun Aug 30 02:19:26 2009 -0400
     1.3 @@ -0,0 +1,45 @@
     1.4 +#!C:/strawberry/perl/bin/perl.exe
     1.5 +
     1.6 +
     1.7 +use CGI::Ajax;
     1.8 +use CGI;
     1.9 +
    1.10 +my $q = new CGI;
    1.11 +
    1.12 +
    1.13 +my %hash = ( 'perl_script' => \&work, 'num2' => \&funtwo);
    1.14 +
    1.15 +
    1.16 +
    1.17 +
    1.18 +
    1.19 +
    1.20 +my $pjx = CGI::Ajax->new(%hash);
    1.21 +$pjx->JSDEBUG(1);
    1.22 +$pjx->DEBUG(1);
    1.23 +print $pjx->build_html($q,\&gen); # this outputs the html for the page
    1.24 +
    1.25 +
    1.26 +
    1.27 +
    1.28 +
    1.29 +
    1.30 +sub funtwo
    1.31 +{
    1.32 +	return 14;
    1.33 +};
    1.34 +
    1.35 +
    1.36 +
    1.37 +sub work
    1.38 +{
    1.39 +	return 13;	
    1.40 +};
    1.41 +
    1.42 +
    1.43 +
    1.44 +sub gen
    1.45 +{
    1.46 +open FILE, "<index.html";
    1.47 +return do { local $/; <FILE> };
    1.48 +};
    1.49 \ No newline at end of file