Commit f9ec5f4d authored by Jakub Wilk's avatar Jakub Wilk

Remove "." from @INC as early as possible

parent 2440cf69
......@@ -21,10 +21,11 @@
package Lintian::coll::ar_info;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use lib "$ENV{LINTIAN_ROOT}/lib";
use FileHandle;
......
......@@ -21,10 +21,11 @@
package Lintian::coll::bin_pkg_control;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use constant ERROR_FILES => qw(control-index-errors control-errors);
......
......@@ -21,10 +21,11 @@
package Lintian::coll::changelog_file;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use File::Copy qw(copy);
......
......@@ -21,10 +21,11 @@
package Lintian::coll::copyright_file;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Util qw(fail gunzip_file is_ancestor_of touch_file);
......
......@@ -21,10 +21,11 @@
package Lintian::coll::debian_readme;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Util qw(fail gunzip_file touch_file is_ancestor_of);
......
......@@ -27,10 +27,11 @@
package Lintian::coll::diffstat;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Util qw(fail get_dsc_info gunzip_file);
......
......@@ -21,10 +21,11 @@
package Lintian::coll::file_info;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use FileHandle;
use lib "$ENV{'LINTIAN_ROOT'}/lib";
......
......@@ -28,10 +28,11 @@
package Lintian::coll::hardening_info;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use FileHandle;
......
......@@ -21,10 +21,11 @@
package Lintian::coll::java_info;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
use FileHandle;
......
......@@ -21,10 +21,11 @@
package Lintian::coll::md5sums;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use FileHandle;
use lib "$ENV{'LINTIAN_ROOT'}/lib";
......
......@@ -25,10 +25,11 @@
package Lintian::coll::objdump_info;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use FileHandle;
......
......@@ -22,10 +22,11 @@
package Lintian::coll::override_file;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Util qw(fail gunzip_file is_ancestor_of);
......
......@@ -21,10 +21,11 @@
package Lintian::coll::scripts;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use lib "$ENV{'LINTIAN_ROOT'}/lib/";
use Lintian::Collect;
......
......@@ -21,10 +21,11 @@
package Lintian::coll::src_orig_index;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
# import perl libraries
use lib "$ENV{'LINTIAN_ROOT'}/lib";
......
......@@ -21,10 +21,11 @@
package Lintian::coll::strings;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use FileHandle;
......
......@@ -22,10 +22,11 @@
package Lintian::coll::unpacked;
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
# Read up to 40kB at the time. This happens to be 4096 "tar records"
# (with a block-size of 512 and a block factor of 20, which appears to
......
......@@ -20,7 +20,7 @@ lintian (2.5.46) UNRELEASED; urgency=medium
+ [JW] Fix typo.
* collection/*:
+ [JW] Remove "." from Perl's module search path. (Mitigates: #588017)
+ [JW,NT] Remove "." from Perl's search path. (Mitigates: #588017)
* commands/lintian:
+ [NT,JW] Remove "." from Perl's search path. (Mitigates: #588017)
......@@ -41,10 +41,10 @@ lintian (2.5.46) UNRELEASED; urgency=medium
+ [JW] Fix typo.
* frontend/dplint:
+ [JW] Remove "." from Perl's search path. (Mitigates: #588017)
+ [JW,NT] Remove "." from Perl's search path. (Mitigates: #588017)
* helpers/coll/*:
+ [JW] Remove "." from Perl's search path. (Mitigates: #588017)
+ [JW,NT] Remove "." from Perl's search path. (Mitigates: #588017)
* lib/Lintian/*.pm:
+ [JW] Fix typos.
......
......@@ -22,11 +22,12 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.
no lib '.';
# In main scope, need an unnamed sub to avoid tainting the "main" namespace
# in case we need to run a ".pm" tool.
use strict;
use warnings;
no lib '.';
my $TOOL_RUNNER = sub {
my ($tool_pm_path) = @_;
......
#!/usr/bin/perl
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
while (my $line = <>) {
my ($file, $type) = $line =~ (m/^(.*?)\x00(.*)$/o);
......
......@@ -19,10 +19,11 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use FileHandle;
......
......@@ -26,10 +26,11 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
my (@sections, @symbol_versions);
my @dyn_symbols;
......
......@@ -19,10 +19,11 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.
no lib '.';
use strict;
use warnings;
use autodie;
no lib '.';
use File::Basename qw(dirname);
use IO::Handle;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment