Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

miyagawa (1653)

  (email not shown publicly)
AOL IM: bulknews (Add Buddy, Send Message)

Journal of miyagawa (1653)

Tuesday December 02, 2003
10:55 AM

Working on new module: Requests for Suggestions to API

[ #16125 ]
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 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();

# ...

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?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Will the module be parsing anything other than queries? If not, then I'd suggest changing parse_query() to just parse(). Not a big change, but saves the end user some typing.