Parse::Flash::Cookie converts (binary, Adobe)
flash cookies to text or XML.
The module's tests fail on a number of platforms. I suspect it
has to do with unpack and byteorder. However, I don't have
access to any of the architectures for which the tests FAIL, so this
is pure speculation.
The tests that fail are primarily of the kind that read a
number and unpack it, but the resulting number isn't what was
expected (edited for brevity):
# +----+------------------------+---------+
# | Elt|Got |Expected |
# +----+------------------------+---------+
# * 1| 1.12884118761808e-319 | 100 *
# * 2| 3.03865194161742e-319 | 1 *
# * 6| 1.30222857005357e-314 | 1251997 *
# +----+------------------------+---------+
It looks like the tests that FAIL contain
byteorder=4321
byteorder=87654321
while the tests that PASS contain
byteorder=1234
byteorder=12345678
The following
unpack templates are used:
return unpack 'C*', $buffer; # bytes
return unpack 'C*', reverse $buffer; # int
return unpack 'C*', reverse $buffer; # long
return unpack 'd*', reverse $buffer; # float
return unpack 's*', reverse $buffer; # short
Is it the case that the byte order is the source of the failing tests?
How do I make the module work on all platforms?