]> git.proxmox.com Git - pve-common.git/commitdiff
fix #1548: replace perl use vars with our
authorTim Marx <t.marx@proxmox.com>
Thu, 15 Nov 2018 08:47:41 +0000 (09:47 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 15 Nov 2018 08:53:06 +0000 (09:53 +0100)
replace deprecated 'use vars qw($frob @mung %seen);' with the now in favor
'our $foo;' declaration
see NOTE at: http://perldoc.perl.org/vars.html

Signed-off-by: Tim Marx <t.marx@proxmox.com>
src/PVE/AtomicFile.pm
src/PVE/Exception.pm
src/PVE/SafeSyslog.pm

index b1889e82fbc844d29e4a2355bba04b6e11d5b769..2086c7ac9e13e90adc3b539f4cc30390fc48ab7d 100644 (file)
@@ -3,9 +3,8 @@ package PVE::AtomicFile;
 use strict;
 use warnings;
 use IO::AtomicFile;
-use vars qw(@ISA);
 
-@ISA = qw(IO::AtomicFile);
+our @ISA = qw(IO::AtomicFile);
 
 sub new {
     my $class = shift;
index fa6b73a22733ee56ddc110fa79a23857434265d6..29fd94afaf914bbbed949d27c03f1c3ac496084b 100644 (file)
@@ -6,12 +6,9 @@ package PVE::Exception;
 
 use strict;
 use warnings;
-use vars qw(@ISA @EXPORT_OK);
-require Exporter;
 use Storable qw(dclone);       
 use HTTP::Status qw(:constants);
 
-@ISA = qw(Exporter);
 
 use overload '""' => sub {local $@; shift->stringify};
 use overload 'cmp' => sub {
@@ -20,7 +17,8 @@ use overload 'cmp' => sub {
     return "$a" cmp "$b"; # compare as string
 };
 
-@EXPORT_OK = qw(raise raise_param_exc raise_perm_exc);
+use base 'Exporter';
+our @EXPORT_OK = qw(raise raise_param_exc raise_perm_exc);
 
 sub new {
     my ($class, $msg, %param) = @_;
index 63b37f84ba8120468b2c56e1b284b0ab3c981c19..c61e97ae9465edfcbb19b1394a0e1430b111bf92 100644 (file)
@@ -5,16 +5,12 @@ use warnings;
 use File::Basename;
 use Sys::Syslog ();
 use Encode;
+use base 'Exporter';
 
-use vars qw($VERSION @ISA @EXPORT);
+our $VERSION = '1.00';
 
-$VERSION = '1.00';
 
-require Exporter;
-
-@ISA = qw(Exporter);
-
-@EXPORT = qw(syslog initlog);
+our @EXPORT = qw(syslog initlog);
 
 my $log_tag = "unknown";