We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 92a8bb9 + b6c08c6 commit 530f425Copy full SHA for 530f425
lib/HTTP/Request/Common.pm
@@ -20,13 +20,9 @@ my $CRLF = "\015\012"; # "\r\n" is not portable
20
sub GET { _simple_req('GET', @_); }
21
sub HEAD { _simple_req('HEAD', @_); }
22
sub DELETE { _simple_req('DELETE', @_); }
23
-
24
-for my $type (qw(PUT PATCH POST)) {
25
- no strict 'refs';
26
- *{ __PACKAGE__ . "::" . $type } = sub {
27
- return request_type_with_data($type, @_);
28
- };
29
-}
+sub PATCH { request_type_with_data('PATCH', @_); }
+sub POST { request_type_with_data('POST', @_); }
+sub PUT { request_type_with_data('PUT', @_); }
30
31
sub request_type_with_data
32
{
0 commit comments