Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: How to loop through Plack::Request body_parameters ?

by Fletch (Bishop)
on Feb 12, 2020 at 14:41 UTC ( [id://11112866]=note: print w/replies, xml ) Need Help??


in reply to Re: How to loop through Plack::Request body_parameters ?
in thread How to loop through Plack::Request body_parameters ?

It's not just approximately shown; the keys documentation explicitly says that (so long as it's not modified) they will return the same order for the same hash (emphasis mine):

Hash entries are returned in an apparently random order. The actual random order is specific to a given hash; the exact same series of operations on two hashes may result in a different order for each hash. Any insertion into the hash may change the order, as will any deletion, with the exception that the most recent key returned by "each" or "keys" may be deleted without changing the order. So long as a given hash is unmodified you may rely on "keys", "values" and "each" to repeatedly return the same order as each other.

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • Comment on Re^2: How to loop through Plack::Request body_parameters ?

Replies are listed 'Best First'.
Re^3: How to loop through Plack::Request body_parameters ?
by Your Mother (Archbishop) on Feb 12, 2020 at 16:00 UTC

    I did mention that the doc for keys says this. :P

Re^3: How to loop through Plack::Request body_parameters ?
by knox (Sexton) on Feb 12, 2020 at 18:13 UTC
    thanks! Not sure if my implementation was the best in this case, but its good to know this.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11112866]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-20 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found