Przeglądaj źródła

perl: Place strict and warning pragma uses as the first thing

Guillem Jover 13 lat temu
rodzic
commit
047cf6685c

+ 3 - 3
dselect/methods/Dselect/Ftp.pm

@@ -12,14 +12,14 @@
 
 package Dselect::Ftp;
 
-use Net::FTP;
-use Data::Dumper;
-
 use strict;
 use warnings;
 
 use Exporter qw(import);
 
+use Net::FTP;
+use Data::Dumper;
+
 our @EXPORT = qw(%config yesno do_connect do_mdtm add_site edit_site
                  edit_config read_config store_config view_mirrors nb);
 our %config;

+ 3 - 3
scripts/t/100_Dpkg_Version.t

@@ -13,12 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More;
-use Dpkg::ErrorHandling;
-
 use strict;
 use warnings;
 
+use Test::More;
+use Dpkg::ErrorHandling;
+
 report_options(quiet_warnings => 1);
 
 my @tests = <DATA>;

+ 2 - 2
scripts/t/150_Dpkg_Package.t

@@ -13,11 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More tests => 6;
-
 use strict;
 use warnings;
 
+use Test::More tests => 6;
+
 use_ok('Dpkg::Package');
 
 ok(pkg_name_is_illegal(undef));

+ 2 - 2
scripts/t/190_Dpkg_Shlibs_Cppfilt.t

@@ -13,11 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More tests => 124;
-
 use strict;
 use warnings;
 
+use Test::More tests => 124;
+
 use_ok('Dpkg::Shlibs::Cppfilt');
 
 # Simple C++ demangling tests

+ 3 - 3
scripts/t/200_Dpkg_Shlibs.t

@@ -13,13 +13,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+use strict;
+use warnings;
+
 use Test::More tests => 106;
 use Cwd;
 use IO::String;
 
-use strict;
-use warnings;
-
 use_ok('Dpkg::Shlibs');
 
 my $tmp;

+ 3 - 3
scripts/t/300_Dpkg_BuildOptions.t

@@ -13,12 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More tests => 24;
-use Dpkg::ErrorHandling;
-
 use strict;
 use warnings;
 
+use Test::More tests => 24;
+use Dpkg::ErrorHandling;
+
 use_ok('Dpkg::BuildOptions');
 
 {

+ 2 - 2
scripts/t/400_Dpkg_Deps.t

@@ -13,12 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More tests => 20;
-
 use strict;
 use warnings;
 
+use Test::More tests => 20;
 use Dpkg::Arch qw(get_host_arch);
+
 use_ok('Dpkg::Deps');
 
 my $field_multiline = ' , , libgtk2.0-common (= 2.10.13-1)  , libatk1.0-0 (>=

+ 2 - 2
scripts/t/500_Dpkg_Path.t

@@ -13,11 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More tests => 16;
-
 use strict;
 use warnings;
 
+use Test::More tests => 16;
+
 use_ok('Dpkg::Path', 'canonpath', 'resolve_symlink',
        'check_files_are_the_same', 'get_pkg_root_dir',
        'guess_pkg_root_dir', 'relative_to_pkg_root');

+ 2 - 2
scripts/t/700_Dpkg_Control.t

@@ -13,10 +13,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More tests => 22;
-
 use strict;
 use warnings;
+
+use Test::More tests => 22;
 use IO::String;
 
 BEGIN {

+ 2 - 2
scripts/t/800_Dpkg_IPC.t

@@ -13,10 +13,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More tests => 8;
-
 use strict;
 use warnings;
+
+use Test::More tests => 8;
 use File::Temp qw(tempfile);
 
 use_ok('Dpkg::IPC');

+ 2 - 2
scripts/t/850_Dpkg_Compression.t

@@ -13,11 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More tests => 13;
-
 use strict;
 use warnings;
 
+use Test::More tests => 13;
+
 use_ok('Dpkg::Compression');
 use_ok('Dpkg::Compression::FileHandle');
 

+ 3 - 3
scripts/t/910_merge_changelogs.t

@@ -13,6 +13,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+use strict;
+use warnings;
+
 use Test::More tests => 3;
 
 use Dpkg::IPC;
@@ -20,9 +23,6 @@ use File::Spec;
 use File::Compare;
 use File::Temp qw(tempfile);
 
-use strict;
-use warnings;
-
 my $srcdir = $ENV{srcdir} || '.';
 my $datadir = "$srcdir/t/910_merge_changelogs";
 

+ 2 - 2
test/000_pod.t

@@ -13,11 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use Test::More;
-
 use strict;
 use warnings;
 
+use Test::More;
+
 eval 'use Test::Pod 1.00';
 plan skip_all => 'Test::Pod 1.00 required for testing POD' if $@;
 my @poddirs = ( $ENV{srcdir} || '.' );