# HG changeset patch # User robert # Date 1252392326 14400 # Node ID d7dd496a4fa6996cdddb0941c3ba788a45fc1a08 # Parent c702488ef7954f6f2190bb1ed22126dbe9727749 [svn r4] actual functionality! diff -r c702488ef795 -r d7dd496a4fa6 CARD.perl Binary file CARD.perl has changed diff -r c702488ef795 -r d7dd496a4fa6 PokeScrape.pl --- a/PokeScrape.pl Mon Aug 31 14:53:15 2009 -0400 +++ b/PokeScrape.pl Tue Sep 08 02:45:26 2009 -0400 @@ -43,10 +43,11 @@ if ($line =~ m/^new(); $tempCard->addTags($typeTag,$numTag,$nameTag,$setTag,$rarityTag); $tempCard->setPix($pix); + print " $setTag \n"; push @allcards,$tempCard; diff -r c702488ef795 -r d7dd496a4fa6 Rule.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Rule.pm Tue Sep 08 02:45:26 2009 -0400 @@ -0,0 +1,32 @@ +package Rule; +use List::Util qw(first max maxstr min minstr reduce shuffle sum); + +sub new +{ + my $class = shift; + + my $hashREF = + { + _rarity_map => {"Rare" , 1 , "Uncommon" , 3 , "Common" , 6}, + _sets => ("Base Set") + + + + }; + + $objectREF = bless($hashREF, $class); + + return $objectREF; + +} + + +sub getRarityMap { return @_[0]->{'_rarity_map'}; }; +sub getSets { return @_[0]->{'_sets'}; } + + +sub setRarityMap { $_[0]->{_rarity_map} = $_[1]; } +sub setSets { $_[0]->{_sets} = $_[1]; } + + +1; \ No newline at end of file diff -r c702488ef795 -r d7dd496a4fa6 error.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/error.txt Tue Sep 08 02:45:26 2009 -0400 @@ -0,0 +1,1 @@ +Card=HASH(0x9aecc4) Card=HASH(0x99132c) Card=HASH(0x99123c) Card=HASH(0x99119c) Card=HASH(0x9910fc) Card=HASH(0x99105c) Card=HASH(0x990fbc) Card=HASH(0x77160c) Card=HASH(0x77156c) Card=HASH(0x7714cc) Card=HASH(0x9aefd4) Card=HASH(0x9aef34) Card=HASH(0x9aee94) Card=HASH(0x9aedf4) Card=HASH(0x9aed54) Card=HASH(0x9ff66c) Card=HASH(0x9f3dfc) Card=HASH(0x9f3e9c) Card=HASH(0x9f3f3c) Card=HASH(0x9e20c4) Card=HASH(0x9e2164) Card=HASH(0x9e2204) Card=HASH(0x9e22a4) Card=HASH(0x9e2344) Card=HASH(0x9e23e4) Card=HASH(0x9e2484) Card=HASH(0x9e2524) Card=HASH(0x9e25c4) Card=HASH(0x9e2664) Card=HASH(0x9e2704) Card=HASH(0x9e27a4) Card=HASH(0x9e2844) Card=HASH(0x9e28e4) Card=HASH(0x9e2984) Card=HASH(0x9e2a24) Card=HASH(0x9e2ac4) Card=HASH(0x9e2b64) Card=HASH(0x9e2c04) Card=HASH(0x9e2ca4) Card=HASH(0x9e2d44) Card=HASH(0x9e2de4) Card=HASH(0x9e2e84) Card=HASH(0x9e2f24) Card=HASH(0x9e2fc4) Card=HASH(0x9f7f9c) Card=HASH(0x9f803c) Card=HASH(0x9f80dc) Card=HASH(0x9f817c) Card=HASH(0x9f821c) Card=HASH(0x9f82bc) Card=HASH(0x9e306c) Card=HASH(0x9e310c) Card=HASH(0x9e31ac) Card=HASH(0x9e324c) Card=HASH(0x9e32ec) Card=HASH(0x9e338c) Card=HASH(0x9e342c) Card=HASH(0x9e34cc) Card=HASH(0x9e356c) Card=HASH(0x9e360c) Card=HASH(0x9e36ac) Card=HASH(0x9e374c) Card=HASH(0x9e37ec) Card=HASH(0x9e388c) Card=HASH(0x9e392c) Card=HASH(0x9e39cc) Card=HASH(0x9e3a6c) Card=HASH(0x9e3b0c) Card=HASH(0x9e3bac) Card=HASH(0x9e3c4c) Card=HASH(0x9e3cec) Card=HASH(0x9e3d8c) Card=HASH(0x9e3e2c) Card=HASH(0x9e3ecc) Card=HASH(0x9e3f6c) Card=HASH(0x9e400c) Card=HASH(0x9f00a4) Card=HASH(0x9f0144) Card=HASH(0x9f01e4) Card=HASH(0x9f0284) Card=HASH(0x9f0324) Card=HASH(0x9f03c4) Card=HASH(0x9f0464) Card=HASH(0x9f0504) Card=HASH(0x9f05a4) Card=HASH(0x9f0644) Card=HASH(0x9f06e4) Card=HASH(0x9f0784) Card=HASH(0x9e779c) Card=HASH(0x9e783c) Card=HASH(0x9e78dc) Card=HASH(0x9e797c) Card=HASH(0x9e7a1c) Card=HASH(0x9e7abc) Card=HASH(0x9e7b5c) Card=HASH(0x9e7bfc) Card=HASH(0x9e7c9c) Card=HASH(0x9e7d3c) Card=HASH(0x9e7dcc) Card=HASH(0x9e7e5c) Card=HASH(0x9e7eec) Card=HASH(0x9e7f7c) Card=HASH(0x9e800c) Card=HASH(0x9e809c) Card=HASH(0x9e813c) Card=HASH(0x9e81dc) Card=HASH(0x9e827c) Card=HASH(0x9e831c) Card=HASH(0x9e83bc) Card=HASH(0x9e845c) Card=HASH(0x9e84fc) Card=HASH(0x9e859c) Card=HASH(0x9e863c) Card=HASH(0x9e86dc) Card=HASH(0x9e4074) Card=HASH(0x9e4114) Card=HASH(0x9e41b4) Card=HASH(0x9e4254) Card=HASH(0x9e42f4) Card=HASH(0x9e4394) Card=HASH(0x9e4434) Card=HASH(0x9e44d4) Card=HASH(0x9e4574) Card=HASH(0x9e4614) Card=HASH(0x9e46b4) Card=HASH(0x9e4754) Card=HASH(0x9e47f4) Card=HASH(0x9e4894) Card=HASH(0x9e4934) Card=HASH(0x9e49d4) Card=HASH(0x9e4a74) Card=HASH(0x9e4b14) Card=HASH(0x9e4bb4) Card=HASH(0x9e4c54) Card=HASH(0x9e4cf4) Card=HASH(0x9e4d94) Card=HASH(0x9e4e34) Card=HASH(0x9e4ed4) Card=HASH(0x9e4f74) Card=HASH(0x9e5014) Card=HASH(0xa02bf4) Card=HASH(0xa02c94) Card=HASH(0xa02d34) Card=HASH(0xa02dd4) Card=HASH(0xa02e74) Card=HASH(0xa02f14) Card=HASH(0xa02fb4) Card=HASH(0xa03054) Card=HASH(0xa030f4) Card=HASH(0xa03194) Card=HASH(0xa03234) Card=HASH(0xa032d4) Card=HASH(0xa03374) Card=HASH(0xa03414) Card=HASH(0xa034b4) Card=HASH(0xa03554) Card=HASH(0xa035f4) Card=HASH(0xa03694) Card=HASH(0xa03734) Card=HASH(0xa037d4) Card=HASH(0xa03874) Card=HASH(0xa03914) Card=HASH(0xa039b4) Card=HASH(0xa03a54) Card=HASH(0xa03af4) Card=HASH(0xa06d4c) Card=HASH(0xa06dec) Card=HASH(0xa06e8c) Card=HASH(0xa06f2c) Card=HASH(0xa06fcc) Card=HASH(0xa0706c) Card=HASH(0xa0710c) Card=HASH(0xa071ac) Card=HASH(0xa0724c) Card=HASH(0xa072ec) Card=HASH(0xa0738c) Card=HASH(0xa0742c) Card=HASH(0xa074cc) Card=HASH(0xa0756c) Card=HASH(0xa0760c) Card=HASH(0xa076ac) Card=HASH(0xa0774c) Card=HASH(0xa077ec) Card=HASH(0xa0788c) Card=HASH(0xa0792c) Card=HASH(0xa079cc) Card=HASH(0xa07a6c) Card=HASH(0xa07b0c) Card=HASH(0xa07bac) Card=HASH(0xa07c4c) Card=HASH(0xa09c5c) Card=HASH(0xa09cfc) Card=HASH(0xa09d9c) Card=HASH(0xa09e3c) Card=HASH(0xa09edc) Card=HASH(0xa09f7c) Card=HASH(0xa0a01c) Card=HASH(0xa0a0bc) Card=HASH(0xa0a15c) Card=HASH(0xa0a1fc) Card=HASH(0xa0a29c) Card=HASH(0xa0a33c) Card=HASH(0xa0a3dc) Card=HASH(0xa0a47c) Card=HASH(0xa0a51c) Card=HASH(0xa0a5bc) Card=HASH(0xa0a65c) Card=HASH(0xa0a6fc) Card=HASH(0xa0a79c) Card=HASH(0xa0a83c) Card=HASH(0xa0a8dc) Card=HASH(0xa0a97c) Card=HASH(0xa0aa1c) Card=HASH(0xa0aabc) Card=HASH(0xa0ab5c) Card=HASH(0xa0abfc) Card=HASH(0x9eacf4) Card=HASH(0x9ead94) Card=HASH(0x9eae34) Card=HASH(0x9eaed4) Card=HASH(0x9eaf74) Card=HASH(0x9eb014) Card=HASH(0x9eb0b4) Card=HASH(0x9eb154) Card=HASH(0x9eb1f4) Card=HASH(0x9eb294) Card=HASH(0x9eb334) Card=HASH(0x9eb3d4) Card=HASH(0x9eb474) Card=HASH(0x9eb514) Card=HASH(0x9eb5b4) Card=HASH(0x9eb654) Card=HASH(0x9eb6f4) Card=HASH(0x9eb794) Card=HASH(0x9eb834) Card=HASH(0x9eb8d4) Card=HASH(0x9eb974) Card=HASH(0x9eba14) Card=HASH(0x9ebab4) Card=HASH(0x9ebb54) Card=HASH(0x9ebbf4) Card=HASH(0x9ebc94) Card=HASH(0x9ebd34) Card=HASH(0x9ebdd4) Card=HASH(0x9ebe74) Card=HASH(0x9ebf14) Card=HASH(0x9ebfb4) Card=HASH(0x9ec054) Card=HASH(0x9ec0f4) Card=HASH(0x9ec194) Card=HASH(0x9ec234) Card=HASH(0x9ec2d4) Card=HASH(0x9ec374) Card=HASH(0x9ec414) Card=HASH(0x9ec4b4) Card=HASH(0x9ec554) Card=HASH(0x9ec5f4) Card=HASH(0x9ec694) Card=HASH(0x9ec734) Card=HASH(0x9ec7d4) Card=HASH(0x9ec874) Card=HASH(0x9ec914) Card=HASH(0x9ec9b4) Card=HASH(0x9eca54) Card=HASH(0x9ecaf4) Card=HASH(0x9ecb94) Card=HASH(0x9ecc34) Card=HASH(0xa18f1c) Card=HASH(0xa18fbc) Card=HASH(0xa1905c) Card=HASH(0xa190fc) Card=HASH(0xa1919c) Card=HASH(0xa1923c) Card=HASH(0xa192dc) Card=HASH(0xa1937c) Card=HASH(0xa1941c) Card=HASH(0xa194bc) Card=HASH(0xa1955c) Card=HASH(0xa195fc) Card=HASH(0xa1969c) Card=HASH(0xa1973c) Card=HASH(0xa197dc) Card=HASH(0xa1987c) Card=HASH(0xa1991c) Card=HASH(0xa199bc) Card=HASH(0xa19a5c) Card=HASH(0xa19afc) Card=HASH(0xa19b9c) Card=HASH(0xa19c3c) Card=HASH(0xa19cdc) Card=HASH(0xa19d7c) Card=HASH(0xa19e1c) Card=HASH(0xa1ce24) Card=HASH(0xa1cec4) Card=HASH(0xa1cf64) Card=HASH(0xa1d004) Card=HASH(0xa1d0a4) Card=HASH(0xa1d144) Card=HASH(0xa1d1e4) Card=HASH(0xa1d284) Card=HASH(0xa1d324) Card=HASH(0xa1d3c4) Card=HASH(0xa1d464) Card=HASH(0xa1d504) Card=HASH(0xa1d5a4) Card=HASH(0xa1d644) Card=HASH(0xa1d6e4) Card=HASH(0xa1d784) Card=HASH(0xa1d824) Card=HASH(0xa1d8c4) Card=HASH(0xa1d964) Card=HASH(0xa1da04) Card=HASH(0xa1daa4) Card=HASH(0xa1db44) Card=HASH(0xa1dbe4) Card=HASH(0xa1dc84) Card=HASH(0xa1dd24) Card=HASH(0xa1ddc4) Card=HASH(0xa21f44) Card=HASH(0xa21fe4) Card=HASH(0xa22084) Card=HASH(0xa22124) Card=HASH(0xa221c4) Card=HASH(0xa22264) Card=HASH(0xa22304) Card=HASH(0xa223a4) Card=HASH(0xa22444) Card=HASH(0xa224e4) Card=HASH(0xa22584) Card=HASH(0xa22624) Card=HASH(0xa226c4) Card=HASH(0xa22764) Card=HASH(0xa22804) Card=HASH(0xa228a4) Card=HASH(0xa22944) Card=HASH(0xa229e4) Card=HASH(0xa22a84) Card=HASH(0xa22b24) Card=HASH(0xa22bc4) Card=HASH(0xa22c64) Card=HASH(0xa22d04) Card=HASH(0xa22da4) Card=HASH(0xa22e44) Card=HASH(0xa2521c) Card=HASH(0xa252bc) Card=HASH(0xa2535c) Card=HASH(0xa253fc) Card=HASH(0xa2549c) Card=HASH(0xa2553c) Card=HASH(0xa255dc) Card=HASH(0xa2567c) Card=HASH(0xa2571c) Card=HASH(0xa257bc) Card=HASH(0xa2585c) Card=HASH(0xa258fc) Card=HASH(0xa2599c) Card=HASH(0xa25a3c) Card=HASH(0xa25adc) Card=HASH(0xa25b7c) Card=HASH(0xa25c1c) Card=HASH(0xa25cbc) Card=HASH(0xa25d5c) Card=HASH(0xa25dfc) Card=HASH(0xa25e9c) Card=HASH(0xa25f3c) Card=HASH(0xa25fdc) Card=HASH(0xa2607c) Card=HASH(0xa2611c) Card=HASH(0xa2a58c) Card=HASH(0xa2a62c) Card=HASH(0xa2a6cc) Card=HASH(0xa2a76c) Card=HASH(0xa2a80c) Card=HASH(0xa2a8ac) Card=HASH(0xa2a94c) Card=HASH(0xa2a9ec) Card=HASH(0xa2aa8c) Card=HASH(0xa2ab2c) Card=HASH(0xa2abcc) Card=HASH(0xa2ac6c) Card=HASH(0xa2ad0c) Card=HASH(0xa2adac) Card=HASH(0xa2ae4c) Card=HASH(0xa2aeec) Card=HASH(0xa2af8c) Card=HASH(0xa2b02c) Card=HASH(0xa2b0cc) Card=HASH(0xa2b16c) Card=HASH(0xa2b20c) Card=HASH(0xa2b2ac) Card=HASH(0xa2b34c) Card=HASH(0xa2b3ec) Card=HASH(0xa2b48c) Card=HASH(0xa2b52c) Card=HASH(0xa2d66c) Card=HASH(0xa2d70c) Card=HASH(0xa2d7ac) Card=HASH(0xa2d84c) Card=HASH(0xa2d8ec) Card=HASH(0xa2d98c) Card=HASH(0xa2da2c) Card=HASH(0xa2dacc) Card=HASH(0xa2db6c) Card=HASH(0xa2dc0c) Card=HASH(0xa2dcac) Card=HASH(0xa2dd4c) Card=HASH(0xa2ddec) Card=HASH(0xa2de8c) Card=HASH(0xa2df2c) Card=HASH(0xa2dfcc) Card=HASH(0xa2e06c) Card=HASH(0xa2e10c) Card=HASH(0xa2e1ac) Card=HASH(0xa2e24c) Card=HASH(0xa2e2ec) Card=HASH(0xa2e38c) Card=HASH(0xa2e42c) Card=HASH(0xa2e4cc) Card=HASH(0xa2e56c) Card=HASH(0xa0dea4) Card=HASH(0xa0df44) Card=HASH(0xa0dfe4) Card=HASH(0xa0e084) Card=HASH(0xa0e124) Card=HASH(0xa0e1c4) Card=HASH(0xa0e264) Card=HASH(0xa0e304) Card=HASH(0xa0e3a4) Card=HASH(0xa0e444) Card=HASH(0xa0e4e4) Card=HASH(0xa0e584) Card=HASH(0xa0e624) Card=HASH(0xa0e6c4) Card=HASH(0xa0e764) Card=HASH(0xa0e804) Card=HASH(0xa0e8a4) Card=HASH(0xa0e944) Card=HASH(0xa0e9e4) Card=HASH(0xa0ea84) Card=HASH(0xa0eb24) Card=HASH(0xa0ebc4) Card=HASH(0xa0ec64) Card=HASH(0xa0ed04) Card=HASH(0xa0eda4) Card=HASH(0xa0ee44) Card=HASH(0xa0eee4) Card=HASH(0xa0ef84) Card=HASH(0xa0f024) Card=HASH(0xa0f0c4) Card=HASH(0xa0f164) Card=HASH(0xa0f204) Card=HASH(0xa0f2a4) Card=HASH(0xa0f344) Card=HASH(0xa0f3e4) Card=HASH(0xa0f484) Card=HASH(0xa0f524) Card=HASH(0xa0f5c4) Card=HASH(0xa0f664) Card=HASH(0xa0f704) Card=HASH(0xa0f7a4) Card=HASH(0xa0f844) Card=HASH(0xa0f8e4) Card=HASH(0xa0f984) Card=HASH(0xa0fa24) Card=HASH(0xa0fac4) Card=HASH(0xa0fb64) Card=HASH(0xa0fc04) Card=HASH(0xa0fca4) Card=HASH(0xa0fd44) Card=HASH(0xa0fde4) Card=HASH(0xa0fe84) Card=HASH(0xa0ff24) Card=HASH(0xa0ffc4) Card=HASH(0xa10064) Card=HASH(0xa10104) Card=HASH(0xa101a4) Card=HASH(0xa10244) Card=HASH(0xa102e4) Card=HASH(0xa10384) Card=HASH(0xa10424) Card=HASH(0xa104c4) Card=HASH(0xa10564) Card=HASH(0xa10604) Card=HASH(0xa106a4) Card=HASH(0xa10744) Card=HASH(0xa107e4) Card=HASH(0xa10884) Card=HASH(0xa10924) Card=HASH(0xa109c4) Card=HASH(0xa10a64) Card=HASH(0xa10b04) Card=HASH(0xa10ba4) Card=HASH(0xa10c44) Card=HASH(0xa10ce4) Card=HASH(0xa10d84) Card=HASH(0xa10e24) Card=HASH(0xa10ec4) Card=HASH(0xa10f64) Card=HASH(0xa11004) Card=HASH(0xa110a4) Card=HASH(0xa11144) Card=HASH(0xa111e4) Card=HASH(0xa11284) Card=HASH(0xa11324) Card=HASH(0xa113c4) Card=HASH(0xa11464) Card=HASH(0xa11504) Card=HASH(0xa115a4) Card=HASH(0xa11644) Card=HASH(0xa116e4) Card=HASH(0xa11784) Card=HASH(0xa11824) Card=HASH(0xa118c4) Card=HASH(0xa11964) Card=HASH(0xa11a04) Card=HASH(0xa11aa4) Card=HASH(0xa11b44) Card=HASH(0xa11be4) Card=HASH(0xa11c84) Card=HASH(0xa11d24) Card=HASH(0xa11dc4) Card=HASH(0xa47934) Card=HASH(0xa479d4) Card=HASH(0xa47a74) Card=HASH(0xa47b14) Card=HASH(0xa47bb4) Card=HASH(0xa47c54) Card=HASH(0xa47cf4) Card=HASH(0xa47d94) Card=HASH(0xa47e34) Card=HASH(0xa47ed4) Card=HASH(0xa47f74) Card=HASH(0xa48014) Card=HASH(0xa480b4) Card=HASH(0xa48154) Card=HASH(0xa481f4) Card=HASH(0xa48294) Card=HASH(0xa48334) Card=HASH(0xa483d4) Card=HASH(0xa48474) Card=HASH(0xa48514) Card=HASH(0xa485b4) Card=HASH(0xa48654) Card=HASH(0xa486f4) Card=HASH(0xa48794) Card=HASH(0xa48834) Card=HASH(0xa488d4) Card=HASH(0xa4b93c) Card=HASH(0xa4b9dc) Card=HASH(0xa4ba7c) Card=HASH(0xa4bb1c) Card=HASH(0xa4bbbc) Card=HASH(0xa4bc5c) Card=HASH(0xa4bcfc) Card=HASH(0xa4bd9c) Card=HASH(0xa4be3c) Card=HASH(0xa4bedc) Card=HASH(0xa4bf7c) Card=HASH(0xa4c01c) Card=HASH(0xa4c0bc) Card=HASH(0xa4c15c) Card=HASH(0xa4c1fc) Card=HASH(0xa4c29c) Card=HASH(0xa4c33c) Card=HASH(0xa4c3dc) Card=HASH(0xa4c47c) Card=HASH(0xa4c51c) Card=HASH(0xa4c5bc) Card=HASH(0xa4c65c) Card=HASH(0xa4c6fc) Card=HASH(0xa4c79c) Card=HASH(0xa4c83c) Card=HASH(0xa50084) Card=HASH(0xa50124) Card=HASH(0xa501c4) Card=HASH(0xa50264) \ No newline at end of file diff -r c702488ef795 -r d7dd496a4fa6 filter.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/filter.pl Tue Sep 08 02:45:26 2009 -0400 @@ -0,0 +1,32 @@ +sub filter +{ + + $ref = shift; + @list = @_; + my @ret = (); + + for $element(@list) + { + if ($ref->($element)) + { + push @ret, $element; + } + } + + return @ret + +} + + + + +@test = (1,2,3,4,5,6); + +sub even +{ + return ($_[0]%2 == 0); +} + +@rr = &filter(\&even, @test); + +print "@rr"; \ No newline at end of file diff -r c702488ef795 -r d7dd496a4fa6 filter.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/filter.pm Tue Sep 08 02:45:26 2009 -0400 @@ -0,0 +1,26 @@ +package Filter; +use base 'Exporter'; +our @EXPORT = ('filter'); + + +sub filter +{ + + $ref = shift; + @list = @_; + my @ret = (); + + for $element(@list) + { + if ($ref->($element)) + { + push @ret, $element; + } + } + + return @ret + +} + + +1; \ No newline at end of file diff -r c702488ef795 -r d7dd496a4fa6 index.html --- a/index.html Mon Aug 31 14:53:15 2009 -0400 +++ b/index.html Tue Sep 08 02:45:26 2009 -0400 @@ -14,8 +14,24 @@
-
-
+
+ + + +
+
+Base Set +Jungle +Fossil +Team Rocket +Gym Challenge +Gym Heroes + + + +
+
+
rules cards diff -r c702488ef795 -r d7dd496a4fa6 index.pl --- a/index.pl Mon Aug 31 14:53:15 2009 -0400 +++ b/index.pl Tue Sep 08 02:45:26 2009 -0400 @@ -1,13 +1,24 @@ #!C:/strawberry/perl/bin/perl.exe - +use List::Util qw(first max maxstr min minstr reduce shuffle sum); +use Storable; use CGI::Ajax; use CGI; - +use Rule; +use Filter; +use Card; my $q = new CGI; -my %hash = ( 'perl_script' => \&work, 'num2' => \&funtwo); + +my $refstruct = retrieve 'CARD.perl'; +my @pokes = @$refstruct; + + + + + +my %hash = ( 'gen_pack' => \&gen_pack, 'change_rules' => \&change_rules); @@ -15,31 +26,92 @@ my $pjx = CGI::Ajax->new(%hash); -$pjx->JSDEBUG(1); -$pjx->DEBUG(1); +#$pjx->JSDEBUG(1); +#$pjx->DEBUG(1); + print $pjx->build_html($q,\&gen); # this outputs the html for the page +sub change_rules +{ + my $currentRuleref = retrieve 'rlm/booster.prefs'; + $currentRule = $$currentRuleref; + $a = shift; + $currentRule -> setSets(($a)); + store \$currentRule, 'rlm/booster.prefs'; + return $a; + + +} -sub funtwo + + + + + + + + + +sub gen_pack { - return 14; + sub tag_analyze + { + + + + my @sets = $currentRule -> getSets(); + #print ERR @sets; + + my $card = shift; + + #print ERR $card->getPix(); + #print ERR "\n"; + return $card -> hasTags(@sets); + + + } + + my $currentRuleref = retrieve 'rlm/booster.prefs'; + $currentRule = $$currentRuleref; + + #print ERR "@pokes"; + @reduced = filter(\&tag_analyze, @pokes); + + #print ERR "@reduced"; + + for $crd(@reduced) + { + #print ERR $crd->getPix(); + $rob = $rob.$crd->getPix(); + $rob = $rob."
"; + } + + #print $rob; + + #print ERR @reduced; + #print ERR $rob; + #print $rob; + return $rob; + #close ERR; + + }; -sub work -{ - return 13; -}; - sub gen { open FILE, " }; -}; \ No newline at end of file +}; + +#print "done"; + +#print &change_rules("Fossil"); +#print &gen_pack; diff -r c702488ef795 -r d7dd496a4fa6 pjx_radio.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pjx_radio.pl Tue Sep 08 02:45:26 2009 -0400 @@ -0,0 +1,49 @@ +#!C:/strawberry/perl/bin/perl.exe +use strict; +use CGI::Ajax 0.57; +use CGI; + +my $q = new CGI; # need a new CGI object + +# compose our list of functions to export to js +my %hash = ( 'myFunc' => \&perl_func,); + +my $pjx = CGI::Ajax->new( %hash ); # this is our CGI::Ajax object + +$pjx->DEBUG(1); # turn on debugging +$pjx->JSDEBUG(1); # turn on javascript debugging, which will place a + # new div element at the bottom of our page showing + # the asynchrously requested URL + +print $pjx->build_html( $q, \&Show_HTML ); # this builds our html + # page, inserting js + +# This subroutine is responsible for outputting the HTML of the web +# page. +sub Show_HTML { + my $html = < +Radio Example + + +
+
+red +blue +yellow +green +
+
+
+ + +EOT + + return($html); +} + +# this is the exported function +sub perl_func { + $a = shift; + return $a . " was selected"; +} diff -r c702488ef795 -r d7dd496a4fa6 rlm/booster.prefs Binary file rlm/booster.prefs has changed diff -r c702488ef795 -r d7dd496a4fa6 rulegen.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rulegen.pl Tue Sep 08 02:45:26 2009 -0400 @@ -0,0 +1,4 @@ +use Storable; +use Rule; +my $currentRule = Rule -> new(); +store \$currentRule, 'rlm/booster.prefs'; \ No newline at end of file diff -r c702488ef795 -r d7dd496a4fa6 ruletest.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ruletest.pl Tue Sep 08 02:45:26 2009 -0400 @@ -0,0 +1,3 @@ +use Rule; +$currentRule = Rule->new(); +print $currentRule -> getSets(); \ No newline at end of file