Apache2-Autocomplete

 view release on metacpan or  search on metacpan

lib/Apache2/Autocomplete.pm  view on Meta::CPAN

of the location is hard-coded in I<ac.js>. The Perl module
which handles requests for this location has the form

  # module file Apache2/MyAutoComplete.pm
  package Apache2::MyAutoComplete;
  use base qw(Apache2::Autocomplete);
  # use whatever else
  
  sub expand {
    my ($self, $query) = @_;
    # decide what completions to return, based on the $query
    (lc $query, $names, $values, [""]);
  }
  
  sub handler {
    my $r = shift;
    my $ac = __PACKAGE__->new($r);
    $ac->run();
    return Apache2::Const::OK;
  }

This must inherit from I<Apache2::Autocomplete>. Within this
handler must be an I<expand> method:

  sub expand {
    my ($self, $query) = @_;
    # decide what completions to return, based on the $query
    (lc $query, $names, $values, [""]);
  }

which is to return a list of 4 elements
to be used for autocompletion of the I$query> argument
passed in from the form. This list has the
following elements:

=over



( run in 0.480 second using v1.01-cache-2.11-cpan-de7293f3b23 )