Mercurial > rlmcintyre
diff BoosterPack/.svn/text-base/cards.pl.svn-base @ 0:0d795f02a8bb tip
initial committ. what was I thinking?
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 27 Sep 2010 16:57:26 -0400 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/BoosterPack/.svn/text-base/cards.pl.svn-base Mon Sep 27 16:57:26 2010 -0400 1.3 @@ -0,0 +1,49 @@ 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' => \&CardList, 'display_card' => \&DisplayCard , 'tags' => \&getAllTags); 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 getAllTags 1.28 +{ 1.29 + return 14; 1.30 +}; 1.31 + 1.32 + 1.33 + 1.34 +sub DisplayCard 1.35 +{ 1.36 + return 13; 1.37 +}; 1.38 + 1.39 + 1.40 +sub CardList 1.41 +{ 1.42 + 1.43 + return 15; 1.44 + 1.45 +}; 1.46 + 1.47 + 1.48 +sub gen 1.49 +{ 1.50 +open FILE, "<cards.html"; 1.51 +return do { local $/; <FILE> }; 1.52 +}; 1.53 \ No newline at end of file