]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Make make_libafs_tree.pl use strict and warnings
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sun, 27 Jun 2010 14:15:33 +0000 (15:15 +0100)
committerDerrick Brashear <shadow@dementia.org>
Mon, 28 Jun 2010 03:34:40 +0000 (20:34 -0700)
Turn on the perl use strict and use warnings options in the
make_libafs_tree script to better catch programming bugs.

Change-Id: Ide358d40eda3cde9dd0261af11993560da71143a
Reviewed-on: http://gerrit.openafs.org/2266
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/config/make_libafs_tree.pl

index 2ed60b96b86384b3ff072eaea6660c7554373b76..fb8295d755ee1603ed3410be7ba2a24f000ac9bf 100755 (executable)
@@ -1,4 +1,7 @@
 #!/usr/bin/perl
+use strict;
+use warnings;
+
 $| = 1;
 #
 # Build the libafs_tree by reading component list files in the src dir, and copying the
@@ -11,6 +14,11 @@ use File::Path;
 
 my $quiet = 0;
 my $showonly = 0;
+my $treedir;
+my $projdir;
+my $sysname;
+my $ostype;
+my $objdir;
 
 while ( $_ = shift @ARGV )
 {
@@ -23,7 +31,7 @@ while ( $_ = shift @ARGV )
 
        if (m/^-q/) { $quiet = 1; next; }
        if (m/^-n/) { $showonly = 1; next; }
-       usage;
+       &usage;
 }
 if ( !$treedir || !$projdir || !$ostype || !$sysname)
 {
@@ -181,7 +189,7 @@ sub testArg
 {
        my ($arg) = @_;
        return $arg if ( $arg && $arg ne "" );
-       usage;
+       &usage;
 }
 
 sub mkfullpath
@@ -208,7 +216,9 @@ sub mkfullpath
 sub copyit
 {
        my ( $from, $to ) = @_;
-       my (@from, @new);
+       my @from;
+       my @new;
+       my @to;
 
        @from = stat($from);
        @to = stat($to);