Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Need help with module problem specific to sun-solarisby tachyon (Chancellor) |
on Nov 08, 2002 at 20:17 UTC ( [id://211524]=note: print w/replies, xml ) | Need Help?? |
Hmmm. As suspected the failures result from a sort order problem. The interesting thing is that they occur in a seemingly random manner (on most systems they are in one order and OK but on other systems they are broken.) CGI::Simple uses the same method of retaining passed param order as CGI. Params are parsed in the order they are received and the param keys are pushed into an array to remember the order. Specifically this happens
@.parameters is used to remeber the supplied order. In the test scripts the problem arises thusly:
This is the code for the first test that fails. Evidently on certain versions of perl/OS the bucket architecture changes so that when the hash ref is passed in some cases this code:
returns the keys in a different order. As a result they are pushed into @.parameters in a different order and returned in a different order. Adding a reverse sort at this point will fix the tests BUT as this is exactly the same method CGI uses break concurrence. Rather than break this concurrence I will modify the test to reflect the two possible return cases. For all intents and purposes it is unlikey to make any real world difference. Thanks very much for your time cheers tachyon s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In Section
Seekers of Perl Wisdom
|
|