Mercurial > rlmcintyre
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0d795f02a8bb |
---|---|
1 #!C:/strawberry/perl/bin/perl.exe | |
2 | |
3 | |
4 use CGI::Ajax; | |
5 use CGI; | |
6 | |
7 my $q = new CGI; | |
8 | |
9 | |
10 my %hash = ( 'card_list' => \&CardList, 'display_card' => \&DisplayCard , 'tags' => \&getAllTags); | |
11 | |
12 | |
13 | |
14 | |
15 my $pjx = CGI::Ajax->new(%hash); | |
16 $pjx->JSDEBUG(1); | |
17 $pjx->DEBUG(1); | |
18 print $pjx->build_html($q,\&gen); # this outputs the html for the page | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 sub getAllTags | |
25 { | |
26 return 14; | |
27 }; | |
28 | |
29 | |
30 | |
31 sub DisplayCard | |
32 { | |
33 return 13; | |
34 }; | |
35 | |
36 | |
37 sub CardList | |
38 { | |
39 | |
40 return 15; | |
41 | |
42 }; | |
43 | |
44 | |
45 sub gen | |
46 { | |
47 open FILE, "<cards.html"; | |
48 return do { local $/; <FILE> }; | |
49 }; |