Hello fellow Monks,

I was redirected here by a veteran perl slinger on another forum after we bounced this question around for awhile:

"Is there a simple module already available to specifically parse incoming query strings?"

We looked around the CPAN and bounced a few modules around that were for string parsing and the like, but nothing quite fit what I'm going for. The idea is simple: you instantiate your object, call a prepare(RULES) method to set RULES, then call a parse_string($query) method. You grab the hash reference return value from parse_string in a scalar and off you go with a list of words that go with AND and NOT booleans, quoted phrases, etc. The rules that you pass tell the module what type of search you're using (i.e. does it default to OR or AND between words), what your wildcards are, how to treat certain errors, etc., etc. It's database and system independant (so far), so that's a plus.

I'm about 30% done with the module, and I want to know if this description rings a bell with anyone about anything on the CPAN. If there's already a very similar module (or one that could easily be made similar), I won't bother releasing this one on the CPAN. Anyone who recognizes such a module, please chime in so I don't go wasting anybody's extra space or bandwidth!

Thank you, Chris


In reply to Query String Parsing Module by Ctb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.