annotate cards.pl @ 0:477258d09353 boosterpack

[svn r1] initial import
author robert
date Sun, 30 Aug 2009 02:19:26 -0400
parents
children c702488ef795
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 = ( 'card_list' => \&work, 'current_card' => \&funtwo);
robert@0 11
robert@0 12
robert@0 13
robert@0 14
robert@0 15 my $pjx = CGI::Ajax->new(%hash);
robert@0 16 $pjx->JSDEBUG(1);
robert@0 17 $pjx->DEBUG(1);
robert@0 18 print $pjx->build_html($q,\&gen); # this outputs the html for the page
robert@0 19
robert@0 20
robert@0 21
robert@0 22
robert@0 23
robert@0 24 sub funtwo
robert@0 25 {
robert@0 26 return 14;
robert@0 27 };
robert@0 28
robert@0 29
robert@0 30
robert@0 31 sub work
robert@0 32 {
robert@0 33 return 13;
robert@0 34 };
robert@0 35
robert@0 36
robert@0 37
robert@0 38
robert@0 39
robert@0 40
robert@0 41
robert@0 42
robert@0 43
robert@0 44
robert@0 45
robert@0 46
robert@0 47
robert@0 48
robert@0 49
robert@0 50
robert@0 51 sub gen
robert@0 52 {
robert@0 53 open FILE, "<cards.html";
robert@0 54 return do { local $/; <FILE> };
robert@0 55 };