source: main/trunk/greenstone2/perllib/cpan/URI/http.pm@ 32787

Last change on this file since 32787 was 27174, checked in by davidb, 11 years ago

Perl modules from CPAN that are used in supporting activate.pl, but not part of the Perl core. Only PMs included.

File size: 405 bytes
Line 
1package URI::http;
2
3require URI::_server;
4@ISA=qw(URI::_server);
5
6use strict;
7
8sub default_port { 80 }
9
10sub canonical
11{
12 my $self = shift;
13 my $other = $self->SUPER::canonical;
14
15 my $slash_path = defined($other->authority) &&
16 !length($other->path) && !defined($other->query);
17
18 if ($slash_path) {
19 $other = $other->clone if $other == $self;
20 $other->path("/");
21 }
22 $other;
23}
24
251;
Note: See TracBrowser for help on using the repository browser.