annotate cards.pl @ 10:3b52ac950753 boosterpack tip

going to try to fix this thing
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 17:24:06 -0400
parents 8c6d2ce90677
children
rev   line source
rlm@8 1 #!/usr/bin/perl
rlm@8 2
rlm@8 3
rlm@8 4 use CGI::Ajax;
rlm@8 5 use CGI;
rlm@8 6
rlm@8 7 my $q = new CGI;
rlm@8 8
rlm@8 9
rlm@8 10 my %hash = ( 'card_list' => \&CardList, 'display_card' => \&DisplayCard , 'tags' => \&getAllTags);
rlm@8 11
rlm@8 12
rlm@8 13
rlm@8 14
rlm@8 15 my $pjx = CGI::Ajax->new(%hash);
rlm@8 16 $pjx->JSDEBUG(1);
rlm@8 17 $pjx->DEBUG(1);
rlm@8 18 print $pjx->build_html($q,\&gen); # this outputs the html for the page
rlm@8 19
rlm@8 20
rlm@8 21
rlm@8 22
rlm@8 23
rlm@8 24 sub getAllTags
rlm@8 25 {
rlm@8 26 return 14;
rlm@8 27 };
rlm@8 28
rlm@8 29
rlm@8 30
rlm@8 31 sub DisplayCard
rlm@8 32 {
rlm@8 33 return 13;
rlm@8 34 };
rlm@8 35
rlm@8 36
rlm@8 37 sub CardList
rlm@8 38 {
rlm@8 39
rlm@8 40 return 15;
rlm@8 41
rlm@8 42 };
rlm@8 43
rlm@8 44
rlm@8 45 sub gen
rlm@8 46 {
rlm@8 47 open FILE, "<cards.html";
rlm@8 48 return do { local $/; <FILE> };
rlm@8 49 };