From: Shiar Date: Sun, 28 Sep 2008 03:10:10 +0000 (+0200) Subject: fix debug messages during replay parsing X-Git-Url: http://git.shiar.nl/perl/schtarr.git/commitdiff_plain/09f41b321e810b4955ad185dbd07d0065f4043b1 fix debug messages during replay parsing Verbosity is defined by $SHOWWARN in the main namespace, which needs to be specified specifically since moving into a different module. --- diff --git a/Data-StarCraft/lib/Data/StarCraft/Replay.pm b/Data-StarCraft/lib/Data/StarCraft/Replay.pm index 507f7d6..3eb3825 100644 --- a/Data-StarCraft/lib/Data/StarCraft/Replay.pm +++ b/Data-StarCraft/lib/Data/StarCraft/Replay.pm @@ -4,6 +4,8 @@ use strict; use warnings; use Data::Dumper; +our $VERSION = '1.00'; + use constant { CMD_REPEAT => 4, }; @@ -356,7 +358,7 @@ sub open { if (not defined $cmdread{$cmd}) { warn sprintf "command #%X not defined: %d bytes ignored\n", $cmd, scalar @block; - push @$self, [$time, $player, "??? $cmd"] if $SHOWWARN; + push @$self, [$time, $player, "??? $cmd"] if $::SHOWWARN; last; }