[devscripts] 02/03: Use "push @INC, …" instead of "use lib"
James McCoy
jamessan at debian.org
Sat Jun 7 19:48:08 UTC 2014
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 7854a1f77afc833e732dc1d1d758668ded17d8ce
Author: James McCoy <jamessan at debian.org>
Date: Sat Jun 7 15:37:35 2014 -0400
Use "push @INC, …" instead of "use lib"
"use lib" prepends to @INC which prevents running in-tree when changes
to Devscripts::* have been made.
Signed-off-by: James McCoy <jamessan at debian.org>
---
scripts/bts.pl | 2 +-
scripts/debchange.pl | 2 +-
scripts/debcheckout.pl | 2 +-
scripts/debdiff.pl | 2 +-
scripts/debuild.pl | 2 +-
scripts/dget.pl | 2 +-
scripts/dpkg-depcheck.pl | 2 +-
scripts/rc-alert.pl | 2 +-
scripts/tagpending.pl | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/scripts/bts.pl b/scripts/bts.pl
index c8ddfa9..0b31baa 100755
--- a/scripts/bts.pl
+++ b/scripts/bts.pl
@@ -53,7 +53,7 @@ use Net::SMTP;
use Cwd;
use IO::File;
use IO::Handle;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::DB_File_Lock;
use Devscripts::Debbugs;
use Fcntl qw(O_RDWR O_RDONLY O_CREAT F_SETFD);
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index 96a6fc5..0ad61b5 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -41,7 +41,7 @@ use File::Basename;
use Cwd;
use Dpkg::Vendor qw(get_current_vendor);
use Dpkg::Changelog::Parse;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Devscripts::Debbugs;
use POSIX qw(locale_h strftime);
diff --git a/scripts/debcheckout.pl b/scripts/debcheckout.pl
index 47cbf30..79baa6e 100755
--- a/scripts/debcheckout.pl
+++ b/scripts/debcheckout.pl
@@ -247,7 +247,7 @@ use File::Basename;
use File::Copy qw/copy/;
use File::Temp qw/tempdir/;
use Cwd;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Devscripts::Versort;
diff --git a/scripts/debdiff.pl b/scripts/debdiff.pl
index f0d0c5f..b29348e 100755
--- a/scripts/debdiff.pl
+++ b/scripts/debdiff.pl
@@ -23,7 +23,7 @@ use File::Basename;
use File::Spec;
use File::Path qw/ rmtree /;
use File::Temp qw/ tempdir tempfile /;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Devscripts::Versort;
diff --git a/scripts/debuild.pl b/scripts/debuild.pl
index 12efcda..fc5fc4e 100755
--- a/scripts/debuild.pl
+++ b/scripts/debuild.pl
@@ -53,7 +53,7 @@ use 5.008;
use File::Basename;
use filetest 'access';
use Cwd;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use IO::Handle; # for flushing
use vars qw(*BUILD *OLDOUT *OLDERR); # prevent a warning
diff --git a/scripts/dget.pl b/scripts/dget.pl
index 9a6fb4b..cf060e7 100755
--- a/scripts/dget.pl
+++ b/scripts/dget.pl
@@ -31,7 +31,7 @@ use Cwd qw(abs_path);
use IO::Dir;
use IO::File;
use Digest::MD5;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Getopt::Long qw(:config gnu_getopt);
use File::Basename;
diff --git a/scripts/dpkg-depcheck.pl b/scripts/dpkg-depcheck.pl
index ab6ce84..188561e 100755
--- a/scripts/dpkg-depcheck.pl
+++ b/scripts/dpkg-depcheck.pl
@@ -22,7 +22,7 @@ use Cwd;
use File::Basename;
use Getopt::Long;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Set;
use Devscripts::Packages;
use Devscripts::PackageDeps;
diff --git a/scripts/rc-alert.pl b/scripts/rc-alert.pl
index 1e49755..555b5f5 100755
--- a/scripts/rc-alert.pl
+++ b/scripts/rc-alert.pl
@@ -21,7 +21,7 @@
use strict;
use warnings;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Packages;
use File::Basename;
use Getopt::Long qw(:config gnu_getopt);
diff --git a/scripts/tagpending.pl b/scripts/tagpending.pl
index 19e7fbc..c657c8b 100755
--- a/scripts/tagpending.pl
+++ b/scripts/tagpending.pl
@@ -28,7 +28,7 @@ use strict;
use warnings;
use Getopt::Long qw(:config gnu_getopt);
use File::Basename;
-use lib '/usr/share/devscripts';
+BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Debbugs;
sub bugs_info;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list