diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-18 23:10:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-18 23:10:57 +0000 |
commit | 40b4b6e177c62a14c166dbba6adf3abc415af4b2 (patch) | |
tree | 2996bf29509c806bd8064fb6cf38092c1b375ff8 /Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm | |
parent | 8e743c86b6872f30b7a35c72aa944455157d4b3f (diff) |
tlperl 5.24.1 from siep
git-svn-id: svn://tug.org/texlive/trunk@43914 c570f23f-e606-0410-a88d-b1316a301751
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; } |