Skip Menu |

This queue is for tickets about the Games-Cards-Poker CPAN distribution.

Report information
The Basics
Id: 100391
Status: resolved
Priority: 0/
Queue: Games-Cards-Poker

People
Owner: Pip [...] CPAN.Org
Requestors: Feliix1956 [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.2.565CHh5
Fixed in: 1.4



Subject: Bug in Games-Cards-Poker
Date: Mon, 17 Nov 2014 00:43:03 +0000
To: <bug-Games-Cards-Poker [...] rt.cpan.org>
From: Iain Milne <Feliix1956 [...] hotmail.com>
Good Evening, I recently picked up Games::Cards::Poker 1.2.565CHh5 through CPAN while developing a little helpful app for a friend of mine. It is very handy and I am really impressed with it. One piece of functionality appears to be returning an odd result though. When I call “WorstHand” against an array containing As and 2s (ace of spades and 2 of spades) it returns a handstring of “AA222” which when passed to the ScoreHand function obviously gives a very high score of a “Full House”. My perl version is v5.18.2 on Linux 2.6.39.1-x86_64-linode19 #1 SMP Tue Jun 21 10:04:20 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux It all seems to be working as expected when there are higher numbers of cards. I have had a look at the source to see if I can spot the source of the issue but unfortunately I couldn’t figure it out. I have eliminated the SortCards function as the source of the issue (called as a sub in WorstHand) since this still returns As2s as the hand. I have a page hosted at http://killmails.com/cgi-bin/skillcheck.pl?WHAT1=NONE&WHAT2=NONE&WHAT3=NONE&WHAT4=NONE&WHAT5=NONE&submit=Submit&SKILL=1&DIFF=As2s&WHATSELECT=true&WHO=3%7C0%7C0%7C0%7C0 that demonstrates the bug. There is some debug information at the bottom of the page that shows the array for the “player” and “difficulty” hands, the result of “worsthand” for difficulty and the result of SortCards for the difficulty hand. I recognise that this module is very old and possibly dormant now but if you would be able to assist with this issue I would be greatly appreciative. Thanks, Iain Milne
Hello Iain, Thank you for the detailed bug report you provided for me a few years ago now. I'm sorry I wasn't able to attend to it sooner. I've just today uploaded a new version 1.4 Poker package which should resolve the issue you encountered. It should be indexed by the CPAN soon. Thanks again! L8r dude, -- -Pip@CPAN.Org