Add query building to csfterm.pm