home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl_ste.zip / auto / URI / URL / http / keywords.al < prev    next >
Text File  |  1997-11-28  |  541b  |  19 lines

  1. # NOTE: Derived from ./blib/lib/URI/URL/http.pm.  Changes made here will be lost.
  2. package URI::URL::http;
  3.  
  4. # Handle ...?dog+bones type of query
  5. sub keywords {
  6.     my $self = shift;
  7.     $old = $self->{'query'};
  8.     if (@_) {
  9.     # Try to set query string
  10.     $self->equery(join('+', map { URI::Escape::uri_escape($_, $URI::URL::reserved) } @_));
  11.     }
  12.     return if !defined($old) || !defined(wantarray);
  13.  
  14.     Carp::croak("Query is not keywords") if $old =~ /=/;
  15.     map { URI::Escape::uri_unescape($_) } split(/\+/, $old);
  16. }
  17.  
  18. 1;
  19.