From: Michael Andreen Date: Fri, 29 Dec 2006 15:32:41 +0000 (+0000) Subject: fatal warnings X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;ds=inline;h=764e9ff37fd3c5c9e8409695ddb315eed67d56de;p=ndwebbie.git fatal warnings --- diff --git a/memberIntel.pl b/memberIntel.pl index db7c939..6aa1e0e 100644 --- a/memberIntel.pl +++ b/memberIntel.pl @@ -18,6 +18,8 @@ #**************************************************************************/ use strict; +use warnings FATAL => 'all'; +no warnings qw(uninitialized); use POSIX; our $BODY; our $DBH; @@ -39,7 +41,7 @@ if (param('show') eq 'all'){ my $query = $DBH->prepare(intelquery('o.alliance AS oalliance,coords(o.x,o.y,o.z) AS origin, coords(t.x,t.y,t.z) AS target, t.nick',"t.alliance_id = 1 $showticks")); $query->execute() or $error .= $DBH->errstr; my @intellists; -my @intel; +my @incomings; my $i = 0; while (my $intel = $query->fetchrow_hashref){ if ($intel->{ingal}){ @@ -49,14 +51,14 @@ while (my $intel = $query->fetchrow_hashref){ } $i++; $intel->{ODD} = $i % 2; - push @intel,$intel; + push @incomings,$intel; } -push @intellists,{Message => 'Incoming fleets', Intel => \@intel, Origin => 1}; +push @intellists,{Message => 'Incoming fleets', Intel => \@incomings, Origin => 1}; -my $query = $DBH->prepare(intelquery('o.nick,coords(o.x,o.y,o.z) AS origin,t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',"o.alliance_id = 1 $showticks")); +$query = $DBH->prepare(intelquery('o.nick,coords(o.x,o.y,o.z) AS origin,t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',"o.alliance_id = 1 $showticks")); $query->execute() or $error .= $DBH->errstr; -my @intel; -my $i = 0; +my @outgoings; +$i = 0; while (my $intel = $query->fetchrow_hashref){ if ($intel->{ingal}){ $intel->{missionclass} = 'ingal'; @@ -65,9 +67,9 @@ while (my $intel = $query->fetchrow_hashref){ } $i++; $intel->{ODD} = $i % 2; - push @intel,$intel; + push @outgoings,$intel; } -push @intellists,{Message => 'Outgoing Fleets', Intel => \@intel, Target => 1}; +push @intellists,{Message => 'Outgoing Fleets', Intel => \@outgoings, Target => 1}; $BODY->param(IntelLIsts => \@intellists); diff --git a/templates/memberIntel.tmpl b/templates/memberIntel.tmpl index 9d74cf3..bc69dc7 100644 --- a/templates/memberIntel.tmpl +++ b/templates/memberIntel.tmpl @@ -11,12 +11,12 @@ - +