Lines 34-42
B<get_suggestions (\%param)> - get suggestions for the search described
Link Here
|
34 |
in $param->{'search'}, and return them in a hashref with the suggestions |
34 |
in $param->{'search'}, and return them in a hashref with the suggestions |
35 |
as keys and relevance as values. |
35 |
as keys and relevance as values. |
36 |
|
36 |
|
37 |
The following variables must be defined in each filter: |
37 |
B<NAME> - return a string with the name of the plugin. |
38 |
our $NAME ='Filter'; |
38 |
|
39 |
our $VERSION = '1.0'; |
39 |
B<VERSION> - return a string with the version of the plugin. |
40 |
|
40 |
|
41 |
These methods may be overriden: |
41 |
These methods may be overriden: |
42 |
|
42 |
|
Lines 123-168
sub get_suggestions {
Link Here
|
123 |
return; |
123 |
return; |
124 |
} |
124 |
} |
125 |
|
125 |
|
126 |
=head2 NAME |
|
|
127 |
|
128 |
my $name = $plugin->NAME; |
129 |
|
130 |
Getter function for plugin names. |
131 |
|
132 |
=cut |
133 |
|
134 |
sub NAME { |
135 |
my $self = shift; |
136 |
my $package = ref $self || $self; |
137 |
return eval '$' . $package . '::NAME'; |
138 |
} |
139 |
|
140 |
=head2 VERSION |
141 |
|
142 |
my $version = $plugin->VERSION; |
143 |
|
144 |
Getter function for plugin versions. |
145 |
|
146 |
=cut |
147 |
|
148 |
sub VERSION { |
149 |
my $self = shift; |
150 |
my $package = ref $self || $self; |
151 |
return eval '$' . $package . '::VERSION'; |
152 |
} |
153 |
|
154 |
=head2 DESCRIPTION |
155 |
|
156 |
my $description = $plugin->DESCRIPTION; |
157 |
|
158 |
Getter function for plugin descriptions. |
159 |
|
160 |
=cut |
161 |
|
162 |
sub DESCRIPTION { |
163 |
my $self = shift; |
164 |
my $package = ref $self || $self; |
165 |
return eval '$' . $package . '::DESCRIPTION'; |
166 |
} |
167 |
|
168 |
1; |
126 |
1; |