Procházet zdrojové kódy

dselect: Use warn instead of print STDERR in method scripts

Addresses InputOutput::RequireBracedFileHandleWithPrint.

Warned-by: perlcritic
Guillem Jover před 12 roky
rodič
revize
e5a6908870

+ 1 - 1
dselect/methods/disk/install

@@ -100,7 +100,7 @@ do
 				}
 			}
 			if (!length($invoke)) {
-				print STDERR "
+				warn "
 
 Oh dear, I need to install or upgrade $package, but I don'\''t see
 the appropriate file(s) anywhere.  I'\''m expecting version $version or

+ 2 - 2
dselect/methods/ftp/install

@@ -27,8 +27,8 @@ eval q{
     use Data::Dumper;
 };
 if ($@) {
-    print STDERR "Please install the 'perl' package if you want to use the\n" .
-                 "FTP access method of dselect.\n\n";
+    warn "Please install the 'perl' package if you want to use the\n" .
+         "FTP access method of dselect.\n\n";
     exit 1;
 }
 

+ 2 - 2
dselect/methods/ftp/setup

@@ -21,8 +21,8 @@ use warnings;
 
 eval 'use Net::FTP;';
 if ($@) {
-    print STDERR "Please install the 'perl' package if you want to use the\n" .
-                 "FTP access method of dselect.\n\n";
+    warn "Please install the 'perl' package if you want to use the\n" .
+         "FTP access method of dselect.\n\n";
     exit 1;
 }
 use Dselect::Ftp;

+ 2 - 2
dselect/methods/ftp/update

@@ -21,8 +21,8 @@ use warnings;
 
 eval 'use Net::FTP;';
 if ($@) {
-    print STDERR "Please install the 'perl' package if you want to use the\n" .
-                 "FTP access method of dselect.\n\n";
+    warn "Please install the 'perl' package if you want to use the\n" .
+         "FTP access method of dselect.\n\n";
     exit 1;
 }
 

+ 1 - 1
dselect/methods/multicd/install

@@ -166,7 +166,7 @@ Please change the discs and press <RETURN>.
 				}
 			}
 			if (!length($invoke)) {
-				print STDERR "
+				warn "
 
 Oh dear, I need to install or upgrade $package, but I don'\''t see
 the appropriate file(s) anywhere.  I'\''m expecting version $version or