Parcourir la source

Declare more variables in perl scripts with 'my' instead of 'our'

Guillem Jover il y a 18 ans
Parent
commit
86471e3015
3 fichiers modifiés avec 8 ajouts et 3 suppressions
  1. 6 0
      ChangeLog
  2. 1 1
      scripts/dpkg-scanpackages.pl
  3. 1 2
      scripts/dpkg-shlibdeps.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-11-24  Guillem Jover  <guillem@debian.org>
+
+	* scripts/dpkg-scanpackages.pl (%vercache): Declare with 'my' instead
+	of 'our'.
+	* scripts/dpkg-shlibdeps.pl ($host_arch): Likewise.
+
 2007-11-24  Guillem Jover  <guillem@debian.org>
 
 	* scripts/Dpkg/Arch.pm (get_raw_host_arch): Do not shadow

+ 1 - 1
scripts/dpkg-scanpackages.pl

@@ -140,7 +140,7 @@ defined($override) and (-e $override or
 
 $pathprefix = '' if not defined $pathprefix;
 
-our %vercache;
+my %vercache;
 sub vercmp {
      my ($a,$b)=@_;
      return $vercache{$a}{$b} if exists $vercache{$a}{$b};

+ 1 - 2
scripts/dpkg-shlibdeps.pl

@@ -18,8 +18,6 @@ use Dpkg::Shlibs::SymbolFile;
 use Dpkg::Arch qw(get_host_arch);
 use Dpkg::Fields qw(capit);
 
-our $host_arch= get_host_arch();
-
 # By increasing importance
 my @depfields= qw(Suggests Recommends Depends Pre-Depends);
 my $i=0; my %depstrength = map { $_ => $i++ } @depfields;
@@ -36,6 +34,7 @@ my $varnameprefix= 'shlibs';
 my $ignore_missing_info= 0;
 my $debug= 0;
 my @exclude = ();
+my $host_arch = get_host_arch();
 
 my (@pkg_shlibs, @pkg_symbols);
 if (-d "debian") {