Working on new module: Requests for Suggestions to API
Long time no blogging on use.perl journals …
Now I’m working on a module called “WWW::GooglishQuery” that parses Googlish query parameters like
XML url:foobar.com title:-"XSLT"
and packs it into appropriate data structure. What’s the best API for it? Maybe something like this:> use WWW::GooglishQuery; use CGI;
my $query = CGI->new(); my $text = $query->param(‘q’);
my $q = WWW::GooglishQuery->new(); $q->parse_query($text);
… Then, how do I extract query parameters? Currently I think of returning query as hashref, that is fully compatible with SQL::Abstract module. Then we can search database with Class::DBI::AbstractSearch by passing that hashref.
Any ideas?