in reply to Module to ease query building

DBIx::Class makes this relatively easy, as you can pass additional parameters to a resultset and get back a resultset that will produce a query that matches all of the things you've searched for so far, so you could do something like this:

my $rs = $schema->resultset( 'Users' ); if ( my $year = $cgi->param( 'birth_year' ) ) { $rs = $rs->search( birth_year => $year ); } if ( my $fname = $cgi->param( 'first_name' ) ) { $rs = $rs->search( first_name => $fname ); } while ( my $user = $rs->next ) { print "User ".$user->name." matched!\n"; }

We're not surrounded, we're in a target-rich environment!