Skip to content

Commit 6d06865

Browse files
since we already require perl 5.8, switch "use vars" to "our"
1 parent cabeaa6 commit 6d06865

12 files changed

Lines changed: 34 additions & 40 deletions

File tree

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Revision history for HTTP-Message
1717
- Add support for HTTP status 308, defined in RFC 7238 (Olivier Mengué,
1818
RT#104102)
1919

20+
- drop the use of "use vars" (Karen Etheridge)
21+
2022

2123
_______________________________________________________________________________
2224
2012-10-21 HTTP-Message 6.06

Makefile.PL

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ WriteMakefile(
2929
'IO::Uncompress::Inflate' => 0,
3030
'IO::Uncompress::RawInflate' => 0,
3131
'IO::Uncompress::Bunzip2' => '2.021',
32+
'Exporter' => '5.57',
3233
},
3334
META_MERGE => {
3435
resources => {

lib/HTTP/Config.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ package HTTP::Config;
22

33
use strict;
44
use URI;
5-
use vars qw($VERSION);
65

7-
$VERSION = "6.07";
6+
our $VERSION = "6.07";
87

98
sub new {
109
my $class = shift;

lib/HTTP/Headers.pm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ package HTTP::Headers;
33
use strict;
44
use Carp ();
55

6-
use vars qw($VERSION $TRANSLATE_UNDERSCORE);
7-
$VERSION = "6.07";
6+
our $VERSION = "6.07";
87

98
# The $TRANSLATE_UNDERSCORE variable controls whether '_' can be used
109
# as a replacement for '-' in header field names.
11-
$TRANSLATE_UNDERSCORE = 1 unless defined $TRANSLATE_UNDERSCORE;
10+
our $TRANSLATE_UNDERSCORE = 1 unless defined $TRANSLATE_UNDERSCORE;
1211

1312
# "Good Practice" order of HTTP message headers:
1413
# - General-Headers

lib/HTTP/Headers/Auth.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package HTTP::Headers::Auth;
22

33
use strict;
4-
use vars qw($VERSION);
5-
$VERSION = "6.07";
4+
5+
our $VERSION = "6.07";
66

77
use HTTP::Headers;
88

lib/HTTP/Headers/ETag.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package HTTP::Headers::ETag;
22

33
use strict;
4-
use vars qw($VERSION);
5-
$VERSION = "6.07";
4+
5+
our $VERSION = "6.07";
66

77
require HTTP::Date;
88

lib/HTTP/Headers/Util.pm

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
package HTTP::Headers::Util;
22

33
use strict;
4-
use vars qw($VERSION @ISA @EXPORT_OK);
54

6-
$VERSION = "6.07";
5+
our $VERSION = "6.07";
76

8-
require Exporter;
9-
@ISA=qw(Exporter);
10-
11-
@EXPORT_OK=qw(split_header_words _split_header_words join_header_words);
7+
use base 'Exporter';
128

9+
our @EXPORT_OK=qw(split_header_words _split_header_words join_header_words);
1310

1411

1512
sub split_header_words {

lib/HTTP/Message.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package HTTP::Message;
22

33
use strict;
4-
use vars qw($VERSION $AUTOLOAD);
5-
$VERSION = "6.07";
4+
5+
our $VERSION = "6.07";
66

77
require HTTP::Headers;
88
require Carp;
@@ -640,6 +640,7 @@ sub _stale_content {
640640

641641

642642
# delegate all other method calls to the headers object.
643+
our $AUTOLOAD;
643644
sub AUTOLOAD
644645
{
645646
my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::')+2);

lib/HTTP/Request.pm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
package HTTP::Request;
22

3-
require HTTP::Message;
4-
@ISA = qw(HTTP::Message);
5-
$VERSION = "6.07";
6-
73
use strict;
84

5+
use base 'HTTP::Message';
96

7+
our $VERSION = "6.07";
108

119
sub new
1210
{

lib/HTTP/Request/Common.pm

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
package HTTP::Request::Common;
22

33
use strict;
4-
use vars qw(@EXPORT @EXPORT_OK $VERSION $DYNAMIC_FILE_UPLOAD);
54

6-
$DYNAMIC_FILE_UPLOAD ||= 0; # make it defined (don't know why)
5+
our $DYNAMIC_FILE_UPLOAD ||= 0; # make it defined (don't know why)
76

8-
require Exporter;
9-
*import = \&Exporter::import;
10-
@EXPORT =qw(GET HEAD PUT POST);
11-
@EXPORT_OK = qw($DYNAMIC_FILE_UPLOAD DELETE);
7+
use Exporter 5.57 'import';
8+
9+
our @EXPORT =qw(GET HEAD PUT POST);
10+
our @EXPORT_OK = qw($DYNAMIC_FILE_UPLOAD DELETE);
1211

1312
require HTTP::Request;
1413
use Carp();
1514

16-
$VERSION = "6.07";
15+
our $VERSION = "6.07";
1716

1817
my $CRLF = "\015\012"; # "\r\n" is not portable
1918

0 commit comments

Comments
 (0)