Mercurial > boosterpack
diff cards.pl @ 0:477258d09353 boosterpack
[svn r1] initial import
author | robert |
---|---|
date | Sun, 30 Aug 2009 02:19:26 -0400 |
parents | |
children | c702488ef795 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/cards.pl Sun Aug 30 02:19:26 2009 -0400 1.3 @@ -0,0 +1,55 @@ 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 = ( 'card_list' => \&work, 'current_card' => \&funtwo); 1.14 + 1.15 + 1.16 + 1.17 + 1.18 +my $pjx = CGI::Ajax->new(%hash); 1.19 +$pjx->JSDEBUG(1); 1.20 +$pjx->DEBUG(1); 1.21 +print $pjx->build_html($q,\&gen); # this outputs the html for the page 1.22 + 1.23 + 1.24 + 1.25 + 1.26 + 1.27 +sub funtwo 1.28 +{ 1.29 + return 14; 1.30 +}; 1.31 + 1.32 + 1.33 + 1.34 +sub work 1.35 +{ 1.36 + return 13; 1.37 +}; 1.38 + 1.39 + 1.40 + 1.41 + 1.42 + 1.43 + 1.44 + 1.45 + 1.46 + 1.47 + 1.48 + 1.49 + 1.50 + 1.51 + 1.52 + 1.53 + 1.54 +sub gen 1.55 +{ 1.56 +open FILE, "<cards.html"; 1.57 +return do { local $/; <FILE> }; 1.58 +}; 1.59 \ No newline at end of file