fix debug messages during replay parsing
authorShiar <shiar@shiar.org>
Sun, 28 Sep 2008 03:10:10 +0000 (05:10 +0200)
committerShiar <shiar@shiar.org>
Mon, 17 Nov 2008 16:39:38 +0000 (17:39 +0100)
Verbosity is defined by $SHOWWARN in the main namespace, which needs to
be specified specifically since moving into a different module.

Data-StarCraft/lib/Data/StarCraft/Replay.pm

index 507f7d61eb488b2491ced7df0a7a603594d54df9..3eb3825c36a9a5b88b7848737062479e8013d446 100644 (file)
@@ -4,6 +4,8 @@ use strict;
 use warnings;
 use Data::Dumper;
 
 use warnings;
 use Data::Dumper;
 
+our $VERSION = '1.00';
+
 use constant {
        CMD_REPEAT => 4,
 };
 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;
                        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;
                        }
 
                                last;
                        }