From: Justin Hunter Date: Sat, 20 Feb 2010 01:41:57 +0000 (-0800) Subject: clear the schema before throwing another one on X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c062b43734e8fa09dc9b7c9275771d549e2e2dea;p=dbsrgits%2FSQL-Translator-2.0-ish.git clear the schema before throwing another one on --- diff --git a/lib/SQL/Translator.pm b/lib/SQL/Translator.pm index 93137e5..2eee7b5 100644 --- a/lib/SQL/Translator.pm +++ b/lib/SQL/Translator.pm @@ -43,6 +43,7 @@ class SQL::Translator { isa => Schema, is => 'rw', lazy => 1, + clearer => '_clear_schema', default => sub { SQL::Translator::Object::Schema->new }, ); @@ -109,6 +110,7 @@ class SQL::Translator { $parser ||= $self->parser; if (defined $parser) { $self->_clear_parser; + $self->_clear_schema; $self->parser($parser); $self->parse($data); $return = $self->schema;