From: Justin Hunter Date: Sat, 19 Sep 2009 16:48:18 +0000 (-0700) Subject: ->error does not exist and send on the parser|producer_args X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ae6c7baf5ed9404e41f79537f026953219feb788;p=dbsrgits%2FSQL-Translator-2.0-ish.git ->error does not exist and send on the parser|producer_args --- diff --git a/t/60roundtrip.t b/t/60roundtrip.t index d9a6d67..b189b47 100644 --- a/t/60roundtrip.t +++ b/t/60roundtrip.t @@ -90,7 +90,7 @@ $base_t->$_ (1) for qw/add_drop_table no_comments/; my $base_schema = $base_t->translate( parser => 'YAML', data => do { local $/; <$base_fh>; }, -) or die $base_t->error; +) or die $!; #assume there is at least one table my $string_re = { @@ -136,7 +136,7 @@ sub check_roundtrip { my $base_out = $base_t->translate( data => $base_schema, producer => $args->{engine}, -# producer_args => $args->{producer_args}, + producer_args => $args->{producer_args} || {}, ); like ( @@ -144,7 +144,7 @@ sub check_roundtrip { $string_re->{$args->{engine}} || $string_re->{SQL}, "Received some meaningful output from the first $args->{name} production", ) or do { - diag ( _gen_diag ($base_t->error) ); + diag ( _gen_diag ($@) ); return; }; @@ -154,12 +154,12 @@ sub check_roundtrip { my $mid_schema = $parser_t->translate ( data => $base_out, parser => $args->{engine}, -# parser_args => $args->{parser_args}, + parser_args => $args->{parser_args} || {}, ); isa_ok ($mid_schema, 'SQL::Translator::Object::Schema', "First $args->{name} parser pass produced a schema:") or do { - diag (_gen_diag ( $parser_t->error, $base_out ) ); + diag (_gen_diag ( $@, $base_out ) ); return; }; @@ -186,7 +186,7 @@ sub check_roundtrip { my $rt_out = $parser_t->translate ( data => $mid_schema, producer => $args->{engine}, -# producer_args => $args->{producer_args}, + producer_args => $args->{producer_args} || {}, ); like ( @@ -194,7 +194,7 @@ sub check_roundtrip { $string_re->{$args->{engine}} || $string_re->{SQL}, "Received some meaningful output from the second $args->{name} production", ) or do { - diag ( _gen_diag ( $parser_t->error ) ); + diag ( _gen_diag ( $@ ) ); return; };