On Thu, 11 Mar 2010 07:44:36 +0100, Louis-David Mitterrand 
<vindex+lists-mason-us...@apartia.org> wrote:
> Is there a utility function in mason to parse a raw query string (from
> an external source) into a hash of hashes (like %ARGS)?

CGI::Expand will turn this:

  foo.bar=1&baz=2&quux.0=3&quux.1=4

into this:

  {
    foo  => { bar => 1 },
    baz  => 2,
    quux => [ 3, 4 ]
  }

As MK said, thought, %ARGS isn't a hash of hashes, just a hash of strings
(possibly arrayrefs if multiple values are submitted for a single name, though
I don't remember offhand) -- so this isn't "like %ARGS".

hdp.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to