]> git.proxmox.com Git - pve-common.git/commitdiff
use warnings everywhere.
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 1 Oct 2013 11:19:38 +0000 (13:19 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 1 Oct 2013 11:19:38 +0000 (13:19 +0200)
data/PVE/AtomicFile.pm
data/PVE/Exception.pm
data/PVE/INotify.pm
data/PVE/JSONSchema.pm
data/PVE/Network.pm
data/PVE/PodParser.pm
data/PVE/ProcFSTools.pm
data/PVE/RESTHandler.pm
data/PVE/Tools.pm

index 2d3426b5006eecdc5bc6d6a429c46def4db6e3b1..110a8ae1f8f54316993b7df6c08252325590235b 100644 (file)
@@ -1,6 +1,7 @@
 package PVE::AtomicFile;
 
 use strict;
+use warnings;
 use IO::AtomicFile;
 use vars qw(@ISA);
 
index 63b3843d5f94ea9859cb29f169b2d7ac7bcb9867..fa6b73a22733ee56ddc110fa79a23857434265d6 100644 (file)
@@ -1,12 +1,11 @@
-#!/usr/bin/perl -w
+package PVE::Exception;
 
 # a way to add more information to exceptions (see man perlfunc (die))
 # use PVE::Exception qw(raise);
 # raise ("my error message", code => 400, errors => { param1 => "err1", ...} );
 
-package PVE::Exception;
-
 use strict;
+use warnings;
 use vars qw(@ISA @EXPORT_OK);
 require Exporter;
 use Storable qw(dclone);       
index 0f04dd299cf3fa840b60f09cd2c577d7a42c38da..5b174333ce44939ec9e59b6ea39a4aa74e04e93c 100644 (file)
@@ -3,6 +3,8 @@ package PVE::INotify;
 # todo: maybe we do not need update_file() ?
 
 use strict;
+use warnings;
+
 use POSIX;
 use IO::File;
 use IO::Dir;
index 6866f18a3030d973e33e4f704d1947a30ba1fd16..bb00c69cb5fd5125b3cbf1410cda29907aa5394e 100644 (file)
@@ -1,7 +1,7 @@
 package PVE::JSONSchema;
 
-use warnings;
 use strict;
+use warnings;
 use Storable; # for dclone
 use Getopt::Long;
 use Devel::Cycle -quiet; # todo: remove?
index 1fa1dc799dafce37c70173400175d3959d36fa12..1b755c0431dd8cf5f43ef5b581a4e05225a049ad 100644 (file)
@@ -1,6 +1,7 @@
 package PVE::Network;
 
 use strict;
+use warnings;
 use PVE::Tools qw(run_command);
 use PVE::ProcFSTools;
 use PVE::INotify;
index d3cbb601512b1454bda41c1950fcb237e77aae1a..7e31e1957e71c42a542c9ae1eb7ab76eb91b7af1 100644 (file)
@@ -1,6 +1,7 @@
 package PVE::PodParser;
 
 use strict;
+use warnings;
 use Pod::Parser;
 use base qw(Pod::Parser);
 
index 2c2b376f7ff8d51ea2b9ac4f274de14d5ae9a2c8..79d8cfd80bc846dd7e4dea4dacb8a15740e84e55 100644 (file)
@@ -1,6 +1,7 @@
 package PVE::ProcFSTools;
 
 use strict;
+use warnings;
 use POSIX;
 use Time::HiRes qw (gettimeofday);
 use IO::File;
index 71578471613ac6313b1559bb7745214477c1f0ff..08c10155ef223f5de42d8d0ced3b07c4c35b5273 100644 (file)
@@ -2,7 +2,6 @@ package PVE::RESTHandler;
 
 use strict;
 no strict 'refs'; # our autoload requires this
-
 use warnings;
 use PVE::SafeSyslog;
 use PVE::Exception qw(raise raise_param_exc);
index 0ec74d85d12ea216c162b5acbb999700a4e7f154..fd3c0563cd233e824460e3f2703e9cd7a6c40533 100644 (file)
@@ -1,6 +1,7 @@
 package PVE::Tools;
 
 use strict;
+use warnings;
 use POSIX qw(EINTR);
 use IO::Socket::INET;
 use IO::Select;