Mercurial > boosterpack
annotate index.pl @ 1:c702488ef795 boosterpack
[svn r3] modified
author | robert |
---|---|
date | Mon, 31 Aug 2009 14:53:15 -0400 |
parents | 477258d09353 |
children | d7dd496a4fa6 |
rev | line source |
---|---|
robert@0 | 1 #!C:/strawberry/perl/bin/perl.exe |
robert@0 | 2 |
robert@0 | 3 |
robert@0 | 4 use CGI::Ajax; |
robert@0 | 5 use CGI; |
robert@0 | 6 |
robert@0 | 7 my $q = new CGI; |
robert@0 | 8 |
robert@0 | 9 |
robert@0 | 10 my %hash = ( 'perl_script' => \&work, 'num2' => \&funtwo); |
robert@0 | 11 |
robert@0 | 12 |
robert@0 | 13 |
robert@0 | 14 |
robert@0 | 15 |
robert@0 | 16 |
robert@0 | 17 my $pjx = CGI::Ajax->new(%hash); |
robert@0 | 18 $pjx->JSDEBUG(1); |
robert@0 | 19 $pjx->DEBUG(1); |
robert@0 | 20 print $pjx->build_html($q,\&gen); # this outputs the html for the page |
robert@0 | 21 |
robert@0 | 22 |
robert@0 | 23 |
robert@0 | 24 |
robert@0 | 25 |
robert@0 | 26 |
robert@0 | 27 sub funtwo |
robert@0 | 28 { |
robert@0 | 29 return 14; |
robert@0 | 30 }; |
robert@0 | 31 |
robert@0 | 32 |
robert@0 | 33 |
robert@0 | 34 sub work |
robert@0 | 35 { |
robert@0 | 36 return 13; |
robert@0 | 37 }; |
robert@0 | 38 |
robert@0 | 39 |
robert@0 | 40 |
robert@0 | 41 sub gen |
robert@0 | 42 { |
robert@0 | 43 open FILE, "<index.html"; |
robert@0 | 44 return do { local $/; <FILE> }; |
robert@0 | 45 }; |