From: Justin Hunter Date: Wed, 22 Sep 2010 15:45:39 +0000 (-0700) Subject: add a "data" attribute X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e32b65d1ab3a051d814739135c0bcdfee6bd7e1;p=dbsrgits%2FSQL-Translator-2.0-ish.git add a "data" attribute --- diff --git a/lib/SQL/Translator.pm b/lib/SQL/Translator.pm index a25a59e..31fcffc 100644 --- a/lib/SQL/Translator.pm +++ b/lib/SQL/Translator.pm @@ -62,6 +62,11 @@ class SQL::Translator { is => 'rw', predicate => 'has_producer_args', ); + + has 'data' => ( + isa => Str, + is => 'rw', + ); has 'version' => (isa => Str, is => 'ro', default => $VERSION); has 'add_drop_table' => (isa => Bool, is => 'rw', default => 0); @@ -112,6 +117,7 @@ class SQL::Translator { my $return; $self->_clear_schema if defined $parser; + $data ||= $self->data; $parser ||= $self->parser unless $self->has_parser; if (defined $parser) {