diff options
Diffstat (limited to 'Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm')
-rw-r--r-- | Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm index 66d8f213b98..3288abdbc12 100644 --- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm +++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm @@ -1,10 +1,8 @@ package LWP::Protocol::cpan; - +$LWP::Protocol::cpan::VERSION = '6.25'; use strict; -use vars qw(@ISA); -require LWP::Protocol; -@ISA = qw(LWP::Protocol); +use base qw(LWP::Protocol); require URI; require HTTP::Status; @@ -49,14 +47,14 @@ sub request { # check proxy if (defined $proxy) { - return HTTP::Response->new(&HTTP::Status::RC_BAD_REQUEST, + return HTTP::Response->new(HTTP::Status::RC_BAD_REQUEST, 'You can not proxy with cpan'); } # check method my $method = $request->method; unless ($method eq 'GET' || $method eq 'HEAD') { - return HTTP::Response->new(&HTTP::Status::RC_BAD_REQUEST, + return HTTP::Response->new(HTTP::Status::RC_BAD_REQUEST, 'Library does not allow method ' . "$method for 'cpan:' URLs"); } @@ -64,7 +62,7 @@ sub request { my $path = $request->uri->path; $path =~ s,^/,,; - my $response = HTTP::Response->new(&HTTP::Status::RC_FOUND); + my $response = HTTP::Response->new(HTTP::Status::RC_FOUND); $response->header("Location" => URI->new_abs($path, $CPAN)); $response; } |