From: Darren Chamberlain Date: Mon, 7 Apr 2003 16:27:30 +0000 (+0000) Subject: Why make these globals? X-Git-Tag: v0.02~202 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e099bee9a7f0bcf4fa5bd9466e36fe3a386ccd2f;p=dbsrgits%2FSQL-Translator.git Why make these globals? --- diff --git a/lib/SQL/Translator/Parser/MySQL.pm b/lib/SQL/Translator/Parser/MySQL.pm index 8446af4..b37d07a 100644 --- a/lib/SQL/Translator/Parser/MySQL.pm +++ b/lib/SQL/Translator/Parser/MySQL.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::MySQL; # ------------------------------------------------------------------- -# $Id: MySQL.pm,v 1.13 2003-04-02 01:46:36 kycl4rk Exp $ +# $Id: MySQL.pm,v 1.14 2003-04-07 16:27:30 dlc Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -123,7 +123,7 @@ Here's the word from the MySQL site use strict; use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.14 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -454,8 +454,8 @@ sub parse { my ( $translator, $data ) = @_; $parser ||= Parse::RecDescent->new($GRAMMAR); - $::RD_TRACE = $translator->trace ? 1 : undef; - $DEBUG = $translator->debug; + local $::RD_TRACE = $translator->trace ? 1 : undef; + local $DEBUG = $translator->debug; unless (defined $parser) { return $translator->error("Error instantiating Parse::RecDescent ".