Bug 914963 - Remove spurious defined(@array). r=gps
authorRalph Giles <giles@mozilla.com>
Thu, 24 Oct 2013 15:32:00 -0700
changeset 165836 f94365dffb6fe73e6b4f5bee500f4537688baba6
parent 165835 0f6219c6fb61f3f5e6775d269a6cf52305021024
child 165837 aee15d62fc009d5045828b0f15829d161bf2a3c9
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs914963
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 914963 - Remove spurious defined(@array). r=gps Perl warns against this; defined takes a scalar context so it has no effect on arrays; the correct thing is just to evaluate the array directly in the conditional.
config/milestone.pl
js/src/config/milestone.pl
--- a/config/milestone.pl
+++ b/config/milestone.pl
@@ -50,17 +50,17 @@ if (!defined($OBJDIR)) { $OBJDIR = '.'; 
 $MILESTONE_FILE  = "$TOPSRCDIR/config/milestone.txt";
 @MILESTONE_PARTS = (0, 0, 0, 0);
 
 #
 # Grab milestone (top line of $MILESTONE_FILE that starts with a digit)
 #
 my $milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
 
-if (defined(@TEMPLATE_FILE)) {
+if (@TEMPLATE_FILE) {
   my $TFILE;
 
   foreach $TFILE (@TEMPLATE_FILE) {
     my $BUILT_FILE = "$OBJDIR/$TFILE";
     $TFILE = "$SRCDIR/$TFILE.tmpl";
 
     if (-e $TFILE) {
 
--- a/js/src/config/milestone.pl
+++ b/js/src/config/milestone.pl
@@ -50,17 +50,17 @@ if (!defined($OBJDIR)) { $OBJDIR = '.'; 
 $MILESTONE_FILE  = "$TOPSRCDIR/config/milestone.txt";
 @MILESTONE_PARTS = (0, 0, 0, 0);
 
 #
 # Grab milestone (top line of $MILESTONE_FILE that starts with a digit)
 #
 my $milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
 
-if (defined(@TEMPLATE_FILE)) {
+if (@TEMPLATE_FILE) {
   my $TFILE;
 
   foreach $TFILE (@TEMPLATE_FILE) {
     my $BUILT_FILE = "$OBJDIR/$TFILE";
     $TFILE = "$SRCDIR/$TFILE.tmpl";
 
     if (-e $TFILE) {