Skip to content

Commit 7ab4a13

Browse files
toddratoomic
authored andcommitted
Fix Getopt::Long version number to be 2.50 not 2.5
Get rid of use vars and replace with our.
1 parent 69d9c0e commit 7ab4a13

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

Diff for: cpan/Getopt-Long/lib/Getopt/Long.pm

+16-18
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ use warnings;
1717

1818
package Getopt::Long;
1919

20-
use vars qw($VERSION);
21-
$VERSION = 2.52;
20+
our $VERSION = 2.52;
21+
2222
# For testing versions only.
23-
use vars qw($VERSION_STRING);
24-
$VERSION_STRING = "2.52";
23+
our $VERSION_STRING = "2.52";
2524

2625
use Exporter;
27-
use vars qw(@ISA @EXPORT @EXPORT_OK);
28-
@ISA = qw(Exporter);
26+
our @ISA = qw(Exporter);
2927

3028
# Exported subroutines.
3129
sub GetOptions(@); # always
@@ -35,21 +33,28 @@ sub Configure(@); # on demand
3533
sub HelpMessage(@); # on demand
3634
sub VersionMessage(@); # in demand
3735

36+
37+
################ Initialization ################
38+
# Values for $order. See GNU getopt.c for details.
39+
our ($REQUIRE_ORDER, $PERMUTE, $RETURN_IN_ORDER) = (0..2);
40+
# Version major/minor numbers.
41+
our ($major_version, $minor_version) = $VERSION =~ /^(\d+)\.(\d+)/;
42+
43+
our (@EXPORT, @EXPORT_OK);
3844
BEGIN {
39-
# Init immediately so their contents can be used in the 'use vars' below.
4045
@EXPORT = qw(&GetOptions $REQUIRE_ORDER $PERMUTE $RETURN_IN_ORDER);
4146
@EXPORT_OK = qw(&HelpMessage &VersionMessage &Configure
4247
&GetOptionsFromArray &GetOptionsFromString);
4348
}
4449

4550
# User visible variables.
46-
use vars @EXPORT, @EXPORT_OK;
47-
use vars qw($error $debug $major_version $minor_version);
51+
our ($error, $debug );
52+
4853
# Deprecated visible variables.
49-
use vars qw($autoabbrev $getopt_compat $ignorecase $bundling $order
54+
our ($autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
5055
$passthrough);
5156
# Official invisible variables.
52-
use vars qw($genprefix $caller $gnu_compat $auto_help $auto_version $longprefix);
57+
our ($genprefix, $caller, $gnu_compat, $auto_help, $auto_version, $longprefix);
5358

5459
# Really invisible variables.
5560
my $bundling_values;
@@ -121,13 +126,6 @@ sub import {
121126
Configure(@config) if @config;
122127
}
123128

124-
################ Initialization ################
125-
126-
# Values for $order. See GNU getopt.c for details.
127-
($REQUIRE_ORDER, $PERMUTE, $RETURN_IN_ORDER) = (0..2);
128-
# Version major/minor numbers.
129-
($major_version, $minor_version) = $VERSION =~ /^(\d+)\.(\d+)/;
130-
131129
ConfigDefaults();
132130

133131
################ OO Interface ################

0 commit comments

Comments
 (0)