Shut up "Wide character" warnings in Perl scripts

This commit is contained in:
Eelco Dolstra 2014-08-29 17:48:25 +02:00
parent b72e93bca8
commit 27a01d92c2
10 changed files with 25 additions and 0 deletions

View file

@ -1,5 +1,6 @@
#! @perl@ -w @perlFlags@
use utf8;
use Fcntl qw(:DEFAULT :flock);
use English '-no_match_vars';
use IO::Handle;
@ -9,6 +10,8 @@ use Nix::CopyClosure;
use Nix::Store;
no warnings('once');
binmode STDERR, ":encoding(utf8)";
# General operation:
#

View file

@ -1,5 +1,6 @@
#! @perl@ -w @perlFlags@
use utf8;
use DBI;
use DBD::SQLite;
use File::Basename;
@ -12,6 +13,7 @@ use WWW::Curl::Easy;
use WWW::Curl::Multi;
use strict;
binmode STDERR, ":encoding(utf8)";
Nix::Config::readConfig;

View file

@ -9,6 +9,7 @@ use Nix::Utils;
use POSIX qw(strftime);
STDOUT->autoflush(1);
binmode STDERR, ":encoding(utf8)";
my $logFile = "$Nix::Config::logDir/downloads";

View file

@ -1,10 +1,12 @@
#! @perl@ -w @perlFlags@
use utf8;
use strict;
use Nix::Config;
use Nix::Store;
use Nix::Utils;
binmode STDERR, ":encoding(utf8)";
my $dryRun = 0;
my $verbose = 0;

View file

@ -1,11 +1,14 @@
#! @perl@ -w @perlFlags@
use utf8;
use strict;
use File::Basename;
use File::Path qw(mkpath);
use Nix::Config;
use Nix::Manifest;
binmode STDERR, ":encoding(utf8)";
Nix::Config::readConfig;
my $manifestDir = $Nix::Config::manifestDir;

View file

@ -6,6 +6,7 @@ use Nix::Store;
use Nix::CopyClosure;
use List::Util qw(sum);
binmode STDERR, ":encoding(utf8)";
if (scalar @ARGV < 1) {
print STDERR <<EOF

View file

@ -1,9 +1,12 @@
#! @perl@ -w @perlFlags@
use utf8;
use strict;
use Nix::Config;
use Nix::Utils;
binmode STDERR, ":encoding(utf8)";
# Parse the command line arguments.
my @args = @ARGV;

View file

@ -1,5 +1,6 @@
#! @perl@ -w @perlFlags@
use utf8;
use strict;
use File::Basename;
use File::stat;
@ -7,6 +8,9 @@ use Nix::Store;
use Nix::Config;
use Nix::Utils;
binmode STDERR, ":encoding(utf8)";
my $hashType = $ENV{'NIX_HASH_ALGO'} || "sha256"; # obsolete
my $cacheDir = $ENV{'NIX_DOWNLOAD_CACHE'};

View file

@ -1,9 +1,12 @@
#! @perl@ -w @perlFlags@
use utf8;
use strict;
use Nix::Config;
use Nix::Manifest;
binmode STDERR, ":encoding(utf8)";
my $manifestDir = $Nix::Config::manifestDir;

View file

@ -1,5 +1,6 @@
#! @perl@ -w @perlFlags@
use utf8;
use strict;
use File::Basename;
use File::Path qw(mkpath);
@ -11,6 +12,8 @@ use Nix::Manifest;
use Nix::Utils;
use Nix::Crypto;
binmode STDERR, ":encoding(utf8)";
my $tmpDir = mkTempDir("nix-push");
my $nixExpr = "$tmpDir/create-nars.nix";