SYNOPSIS

    my $search = Net::Trac::TicketSearch->new( connection => $trac );

    $search->query(
        owner       => 'hiro',
        status      => { 'not' => [qw(new reopened)] },
        summary     => { 'contains' => 'yatta!' },
        reporter    => [qw( [email protected] [email protected] )]
    );

    print $_->id, "\n" for @{$search->results};

DESCRIPTION

This class allows you to run ticket searches on a remote Trac instance.

ACCESSORS

connection

limit [\s-1NUMBER\s0]

Get/set the maximum number of results to fetch. Default is 500. This may also be limited by the Trac instance itself.

results

Returns an arrayref of Net::Trac::Tickets for the current query.

url

Returns the relative \s-1URL\s0 for the current query (note the format will be \s-1CSV\s0).

METHODS

query [\s-1PARAMHASH\s0]

Performs a ticket search with the given search conditions. Specify a hash of \*(C`column =\*(C' value> pairs for which to search. Values may be a simple scalar, a hashref, or an arrayref. Specifying a hashref allows you to select a different operator for comparison (see below for a list). An arrayref allows multiple values to be or'd for the same column. Unfortunately Trac has no way of anding multiple values for the same column.

Valid operators are \*(C`is\*(C' (default), \*(C`not\*(C', \*(C`contains\*(C', \*(C`lacks\*(C', \*(C`startswith\*(C', and \*(C`endswith\*(C'.

Returns undef on error and the results otherwise.

LICENSE

Copyright 2008-2009 Best Practical Solutions.

This package is licensed under the same terms as Perl 5.8.8.