[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: Use "X->import" rather than "import X"



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit b9ec51a2c0a07f63cfeb3704bb7a3dc523d51703
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Apr 30 07:57:12 2016 +0000

    Use "X->import" rather than "import X"
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 commands/lintian                | 4 ++--
 frontend/dplint                 | 9 +++------
 private/refresh-ftp-master-tags | 2 +-
 t/scripts/pod-spelling.t        | 2 +-
 4 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/commands/lintian b/commands/lintian
index 1d991e3..6ee76fa 100755
--- a/commands/lintian
+++ b/commands/lintian
@@ -1207,7 +1207,7 @@ sub _find_cfg_file {
             # when we check for it later.
             local $ENV{'HOME'} = $ENV{'HOME'} // '/nonexistent';
             require File::BaseDir;
-            import File::BaseDir qw(config_home config_files);
+            File::BaseDir->import(qw(config_home config_files));
         };
         # only accept config_home if either HOME or
         # XDG_CONFIG_HOME was set.  If both are unset, then this
@@ -1440,7 +1440,7 @@ sub configure_output {
         if ($opt{'debug'} > 2) {
             eval {
                 require Devel::Size;
-                import Devel::Size qw(total_size);
+                Devel::Size->import(qw(total_size));
                 {
                     no warnings qw(once);
                     # Disable warnings about stuff Devel::Size cannot
diff --git a/frontend/dplint b/frontend/dplint
index 4da967e..8c4387c 100755
--- a/frontend/dplint
+++ b/frontend/dplint
@@ -104,11 +104,8 @@ sub run_tool {
             Getopt::Long::config('default');
             # Update @INC before running the tool
             require lib;
-            import lib grep { -d } map { "$_/lib" } @INCLUDE_DIRS;
-#<<<
-            # no Perltidy (breaks the no-critic)
-            $0 = $tool;  ## no critic (Variables::RequireLocalizedPunctuationVars)
-#>>>
+            lib->import(grep { -d } map { "$_/lib" } @INCLUDE_DIRS);
+            $0 = $tool;
             $TOOL_RUNNER->($tool_pm_path);
             error('TOOL_RUNNER returned unexpectedly!?');
         }
@@ -163,7 +160,7 @@ sub load_file_basedir {
     # when we check for it later.
     local $ENV{'HOME'} = $ENV{'HOME'} // '/nonexistent';
     require File::BaseDir;
-    import File::BaseDir qw(config_home config_files data_home);
+    File::BaseDir->import(qw(config_home config_files data_home));
     return;
 }
 
diff --git a/private/refresh-ftp-master-tags b/private/refresh-ftp-master-tags
index a60cbfa..c1aa9ad 100755
--- a/private/refresh-ftp-master-tags
+++ b/private/refresh-ftp-master-tags
@@ -24,7 +24,7 @@ use autodie;
 
 # Not a B-D and script is compile tested...
 require LWP::Simple;
-import LWP::Simple qw(get);
+LWP::Simple->import(qw(get));
 use POSIX qw(strftime);
 
 BEGIN {
diff --git a/t/scripts/pod-spelling.t b/t/scripts/pod-spelling.t
index 410a8d2..75787eb 100755
--- a/t/scripts/pod-spelling.t
+++ b/t/scripts/pod-spelling.t
@@ -54,7 +54,7 @@ sub check_aspell {
         if ($line =~ m/^.i \s+ aspell-en \s+ (\S+) \s/xsm) {
             my $version = $1;
             require Lintian::Relation::Version;
-            import Lintian::Relation::Version qw(versions_gte);
+            Lintian::Relation::Version->import(qw(versions_gte));
             # Print the version of aspell-en if it is not new enough
             $ok = versions_gte($version, '7.1-0~')
               ||diag("Found aspell-en $version, want 7.1-0~ or newer");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: