3 # Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 # (Except where explictly superceded by other copyright notices)
7 # This work is made available to you under the terms of Version 2 of
8 # the GNU General Public License. A copy of that license should have
9 # been provided with this software, but in any event can be snarfed
12 # This work is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # Unless otherwise specified, all modifications, corrections or
18 # extensions to this work which alter its source code become the
19 # property of Best Practical Solutions, LLC when submitted for
20 # inclusion in the work.
26 RT::Search::Generic - ;
30 use RT::Search::Generic;
31 my $tickets = RT::Tickets->new($CurrentUser);
32 my $foo = RT::Search::Generic->new(Argument => $arg,
33 TicketsObj => $tickets);
35 while ( my $ticket = $foo->Next ) {
36 # Do something with each ticket we've found
48 ok (require RT::Search::Generic);
55 package RT::Search::Generic;
62 my $class = ref($proto) || $proto;
64 bless ($self, $class);
78 $self->{'TicketsObj'} = $args{'TicketsObj'};
79 $self->{'Argument'} = $args{'Argument'};
87 Return the optional argument associated with this Search
93 return($self->{'Argument'});
100 Return the Tickets object passed into this search
106 return($self->{'TicketsObj'});
112 return ($self->loc("No description for [_1]", ref $self));
123 eval "require RT::Search::Generic_Vendor";
124 die $@ if ($@ && $@ !~ qr{^Can't locate RT/Search/Generic_Vendor.pm});
125 eval "require RT::Search::Generic_Local";
126 die $@ if ($@ && $@ !~ qr{^Can't locate RT/Search/Generic_Local.pm});